rollforward by ai files

raviraju

Member
suppose i have this structure of ai files

like:- a . f 1024 = full
a . f 1024 = busy

a . f 2046 = empty
a . f 2046 = empty

now how to perform rollforward in this from ..
how we copy these ai extents .. and how we use them for rollforward..

copy extents but where ...please explain me ..
 

TomBascom

Curmudgeon
Whenever an extent is full you make a copy of it. As part of the copy process you rename it. I usually use the sequence number as part of the name. So I end up with copied extents like:

dbname.001
dbname.002
dbname.003
dbname.004
dbname.005
...

Note: there is zero relationship between the sequence number and the extent number.

You should copy the extents to a safe filesystem. "Safe" means that it does not share any of the same hardware with the original database. Ideally it is not in the same building (which protects you against fires, flood and theft). Even better is if it is not in the same time-zone (that protects you against hurricanes, blizzards, earthquakes and so forth).

After you have successfully copied a full extent you mark it empty so that it can be reused.

By the way, making your extents fixed length really makes the scripting and management of after-imaging much more complex than it needs to be. It is *far* simpler to make all after-image extents variable length.

And if you are on a recent release of OpenEdge you should consider using the AI Management Daemon. It automates almost all of what I describe above (it will only do a remote transfer if t\you have the filesystems remotely mounted -- otherwise you will need to script something). The only downside is that it uses an exceedingly ugly naming convention for the copied extents.

You might also like to review this: http://dbappraise.com/ppt/ai.pptx
 

raviraju

Member
can we copy the ai extents by copy command like cp and path name of ai extent like /home/gest/raju/dbnam.a1/reeta(directory name)
 

raviraju

Member
"ai files roll- forward"

1. i made a db with this structure file.


#
b .
#
d "schema area":6,32 .
#
d "app":7,32 . f 1024
d "app":7,32 .
#
a . f 1024
a . f 1025
a . f 2048
a . f 2048
#


2.than i took a backup


$ $DLC/bin/probkup go ./go1


205 active blocks out of 337 blocks in go will be dumped. (6686)
0 bi blocks will be dumped. (6688)
The blocksize is 8192. (6994)
Backup requires an estimated 1.9 MBytes of media. (9285)
Restore would require an estimated 205 db blocks using 1.6 MBytes of media. (9
286)
Backed up 205 db blocks in 00:00:00
Wrote a total of 4 backup blocks using 1.1 MBytes of media. (9284)


Backup complete. (3740)


3 . than i enabled ai files


$ $DLC/bin/rfutil go -C aimage begin
PROGRESS Version 9.1E as of Tue Oct 12 17:19:22 EDT 2004


The BI file is being automatically truncated. (1526)


4.than i saw the staus of ai files




$ $DLC/bin/rfutil go -C aimage list
PROGRESS Version 9.1E as of Tue Oct 12 17:19:22 EDT 20




Extent: 1
Status: Busy
Type: Fixed Length
Path: /home/guest/Ramesh/go.a1
Size: 1016
Used: 1
Start: Tue Aug 14 13:57:42 2012
Seqno: 1


Extent: 2
Status: Empty
Type: Fixed Length
Path: /home/guest/Ramesh/go.a2
Size: 1016
Used: 0
Start: N/A
Seqno: 0


Extent: 3
Status: Empty
Type: Fixed Length
Path: /home/guest/Ramesh/go.a3
Size: 2040
Used: 0
Start: N/A
Seqno: 0


Extent: 4
Status: Empty
Type: Fixed Length
Path: /home/guest/Ramesh/go.a4
Size: 2040
Used: 0
Start: N/A
Seqno: 0


5. than i took one more backup




$ $DLC/bin/probkup go ./go3


205 active blocks out of 337 blocks in go will be dumped. (6686)
0 bi blocks will be dumped. (6688)
The blocksize is 8192. (6994)
Backup requires an estimated 1.9 MBytes of media. (9285)
Restore would require an estimated 205 db blocks using 1.6 MBytes of media. (9
286)
Backed up 205 db blocks in 00:00:00
Wrote a total of 4 backup blocks using 1.1 MBytes of media. (9284)


Backup complete. (3740)


6. than again i cheked the ai file status


$ $DLC/bin/rfutil go -C aimage list
PROGRESS Version 9.1E as of Tue Oct 12 17:19:22 E




Extent: 1
Status: Full
Type: Fixed Length
Path: /home/guest/Ramesh/go.a1
Size: 1016
Used: 1
Start: Tue Aug 14 13:57:42 2012
Seqno: 1


Extent: 2
Status: Busy
Type: Fixed Length
Path: /home/guest/Ramesh/go.a2
Size: 1016
Used: 1
Start: Tue Aug 14 14:01:05 2012
Seqno: 2


Extent: 3
Status: Empty
Type: Fixed Length
Path: /home/guest/Ramesh/go.a3
Size: 2040
Used: 0
Start: N/A
Seqno: 0


Extent: 4
Status: Empty
Type: Fixed Length
Path: /home/guest/Ramesh/go.a4
Size: 2040
Used: 0
Start: N/A
Seqno: 0


7. one extent is filled now and another is busy


8. now again i took one more back offline


$ $DLC/bin/probkup go ./go4


205 active blocks out of 337 blocks in go will be dumped. (6686)
0 bi blocks will be dumped. (6688)
The blocksize is 8192. (6994)
Backup requires an estimated 1.9 MBytes of media. (9285)
Restore would require an estimated 205 db blocks using 1.6 MBytes of media. (9
286)
Backed up 205 db blocks in 00:00:00
Wrote a total of 4 backup blocks using 1.1 MBytes of media. (9284)


Backup complete. (3740)


9 . now again check the staus of ai files..


$ $DLC/bin/rfutil go -C aimage list
PROGRESS Version 9.1E as of Tue Oct 12 17:19:22 E




Extent: 1
Status: Full
Type: Fixed Length
Path: /home/guest/Ramesh/go.a1
Size: 1016
Used: 1
Start: Tue Aug 14 13:57:42 2012
Seqno: 1


Extent: 2
Status: Full
Type: Fixed Length
Path: /home/guest/Ramesh/go.a2
Size: 1016
Used: 1
Start: Tue Aug 14 14:01:05 2012
Seqno: 2


Extent: 3
Status: Busy
Type: Fixed Length
Path: /home/guest/Ramesh/go.a3
Size: 2040
Used: 1
Start: Tue Aug 14 14:04:19 2012
Seqno: 3


Extent: 4
Status: Empty
Type: Fixed Length
Path: /home/guest/Ramesh/go.a4
Size: 2040
Used: 0
Start: N/A
Seqno: 0


now second extent full another one is busy..


10. now again i took one more backup ..




$ $DLC/bin/probkup go ./go5


205 active blocks out of 337 blocks in go will be dumped. (6686)
0 bi blocks will be dumped. (6688)
The blocksize is 8192. (6994)
Backup requires an estimated 1.9 MBytes of media. (9285)
Restore would require an estimated 205 db blocks using 1.6 MBytes of media. (9
286)
Backed up 205 db blocks in 00:00:00
Wrote a total of 4 backup blocks using 1.1 MBytes of media. (9284)


Backup complete. (3740)


11. now again check the status of ai files..


$ $DLC/bin/rfutil go -C aimage list
PROGRESS Version 9.1E as of Tue Oct 12 17:19:22 EDT 2004




Extent: 1
Status: Full
Type: Fixed Length
Path: /home/guest/Ramesh/go.a1
Size: 1016
Used: 1
Start: Tue Aug 14 13:57:42 2012
Seqno: 1


Extent: 2
Status: Full
Type: Fixed Length
Path: /home/guest/Ramesh/go.a2
Size: 1016
Used: 1
Start: Tue Aug 14 14:01:05 2012
Seqno: 2


Extent: 3
Status: Full
Type: Fixed Length
Path: /home/guest/Ramesh/go.a3
Size: 2040
Used: 1
Start: Tue Aug 14 14:04:19 2012
Seqno: 3


Extent: 4
Status: Busy
Type: Fixed Length
Path: /home/guest/Ramesh/go.a4
Size: 2040
Used: 1
Start: Tue Aug 14 14:06:15 2012
Seqno: 4


now third one is filled and next will be busy..


12. again i took a backup




$ $DLC/bin/probkup go ./go6
Switch to new ai extent failed. (3669)


!!! ERROR - Database backup utility FAILED !!! (8563)


it will show this above error...


all extent are filled ..


13.. now i make a directory name kobra


mkdir kobra


14 . than i am copying that full extent to this directory




15. cp /home/guest/Ramesh/go.a1 ./kobra


16. cp /home/guest/Ramesh/go.a2 ./kobra


17. cp /home/guest/Ramesh/go.a3 ./kobra






18. $DLC/bin/rfutil go -C roll forward -a /home/guest/Ramesh/kobra/go.a1




18. all filled extent is now copied to the directory /kobra


19 now i am marked empty of that filled extents .


$ $DLC/bin/rfutil go -C aiamge empty
PROGRESS Version 9.1E as of Tue Oct 12 17:19:22 EDT 2004


Could not recognise: -C aiamge. (348)
$ $DLC/bin/rfutil go -C aimage empty
PROGRESS Version 9.1E as of Tue Oct 12 17:19:22 EDT 2004


The last backup was not completed successfully. (1553)
Marked after-image extent /home/guest/Ramesh/go.a1 EMPTY. (3789)
$ $DLC/bin/rfutil go -C aimage empty
PROGRESS Version 9.1E as of Tue Oct 12 17:19:22 EDT 2004


The last backup was not completed successfully. (1553)
Marked after-image extent /home/guest/Ramesh/go.a2 EMPTY. (3789)
$ $DLC/bin/rfutil go -C aimage empty
PROGRESS Version 9.1E as of Tue Oct 12 17:19:22 EDT 2004


The last backup was not completed successfully. (1553)
Marked after-image extent /home/guest/Ramesh/go.a3 EMPTY. (3789)


20. now agian i took the ai status report


$ $DLC/bin/rfutil go -C aimage list
PROGRESS Version 9.1E as of Tue Oct 12 17:19:22 ED


The last backup was not completed successfully. (1


Extent: 1
Status: Empty
Type: Fixed Length
Path: /home/guest/Ramesh/go.a1
Size: 1016
Used: 0
Start: N/A
Seqno: 0


Extent: 2
Status: Empty
Type: Fixed Length
Path: /home/guest/Ramesh/go.a2
Size: 1016
Used: 0
Start: N/A
Seqno: 0


Extent: 3
Status: Empty
Type: Fixed Length
Path: /home/guest/Ramesh/go.a3
Size: 2040
Used: 0
Start: N/A
Seqno: 0


Extent: 4
Status: Busy
Type: Fixed Length
Path: /home/guest/Ramesh/go.a4
Size: 2040
Used: 1
Start: Tue Aug 14 14:06:15 2012
Seqno: 4




21. now rollforwarding the ai files by using that path


22.$ $DLC/bin/rfutil go -C roll forward -a /home/guest/Ramesh/kobra/go.a1
PROGRESS Version 9.1E as of Tue Oct 12 17:19:22 EDT 2004


The last backup was not completed successfully. (1553)
After-image dates for this after-image file: (1633)
Last AIMAGE BEGIN Tue Aug 14 13:57:42 2012 (1640)
This file was last opened for output on Tue Aug 14 14:01:03 2012. (1643)


1 notes were processed. (1634)
0 in-flight transactions. (3785)
0 transactions were started
0 transactions were ended
At the end of the .ai file, 0 of them were still active


now again i have to enable ai files.. RIGHT?

information that you need


1.PROGRESS Version 9.1E
2.Os version unix AIX
3. i am trying to roll forward..


QUESTION:- My question is that is it right way to rollforward. is it all correct or not????






































 

Cringer

ProgressTalk.com Moderator
Staff member
Re: "ai files roll- forward"

1) Please keep your posts about ai stuff in one thread. (Now moved)
2) Please put [ code] [ /code] tags around logfile output so it's easier to read
 

Arunselvan

Member
APW,AIW and BIW

I like to know how exactly APW,AIW and BIW works.... all of these do write modified buffers to DISK... So what is the exact different between these things????
 

cj_brandt

Active Member
Re: "ai files roll- forward"

I'll add some comments - I'm not sure what the steps above were supposed to accomplish.

Step 5 - why did your backups skip from go1 to go3?
Step 12 - your backup failed because Progress wasn't able to switch to a free AI extent - go.a1 is still full.
Step 18 & 22 - I don't understand this one. You are applying go.a1 from your second backup to the source database which has had 2 additional backups taken ? You should restore a backup and then apply the AI files generated after the backup - not before.
Step 23 - Using rfutil -C roll forward disables AI, so yes you would have to enable AI again.
 

Cringer

ProgressTalk.com Moderator
Staff member
Re: ai files

No idea why but you should make a full backup before making any fundamental changes to your database.
 

RealHeavyDude

Well-Known Member
Re: ai files

Because - the last update time stamp of the database against which you want to roll forward the after image must match the begin time stamp stored in the after image. If this two time stamps don't match exactly, there is no way you are going to roll forward the after image - what makes the after image useless.

If you don't make a backup of the database immediately before you enable the after image, how would you make sure that these two time stamps match and you are able to roll the after image forward?

Heavy Regards, RealHeavyDude.
 

raviraju

Member
Ai files roll forwarding

somebody told this:-Exactly. You disable after imaging immediately before the offline backup starts and enable it immediately after the offline backup has finished. That way you ensure that the after image sequence starts new with every offline backup.

Heavy Regards, RealHeavyDude.

but MS. Tom said that we know need to disable ai file


I don't like that. There is no real benefit to it other than starting with "1".

I prefer to always leave AI turned on.

That way if your backup media turns out to be no good you can just go back to the one before it and start there. I've had to go back almost a full year to get a good backup and was glad that I had all of the ai files ready to go (and properly numbered).
It means that something is confusing Tom said that we can copy the full extents and than after copying we can use for roll forwarding further......??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????///////
 

RealHeavyDude

Well-Known Member
Re: Ai files roll forwarding

Please don't get mad at me but, taking into account the questions you post, I don't think you understand the concept of after imaging.

It is as easy at that: The after image contains a log of all transaction committed since it has been enabled, regardless which backup method you've chosen ( Progress or non-Progress ) and whether you did take a backup at all or just made the enable after image think you did by marking the database as backed up. But if you are wise, you will always pair the after image with a backup. In case of a disaster when you lose your live database you can then use the backup and the after image to restore it.

How many data you lose and how long it does take to recover depends on two factors:

  • The type of disaster your system was exposed to: Could be a database corruption up to a natural disaster where you lose the building in which your production server is located.
  • How the disaster recovery strategy you've chosen enables you to respond.

Now you can utilize backup and after imaging in different ways to satisfy your requirements: It can range from simply enabling the after image and copy the after image extents to an equally save location as where you copy your backups to, up to a lukewarm standby in continuously rolling forward the after image to a standby site ( some of us call this poor man's replication ).

So, in case of a disaster you restore your last good backup and roll forward all after image extents you have to fill the gap between when you've taken that backup and your disaster happened. But if you can't afford the recovery time this will take you must make use of a more sophisticated strategy which could involve a standby that is ready to use when you need it. In order to achieve that standby you can buy the OpenEdge replication product from Progress (which is also based on after imaging) or you can take the after images from your live database as they get full, copy it to a standby machine and roll it forward against the standby database. The interval you chose for that process determines how much data you will lose when you lose your production machine.

Regarding confusion: Sometimes there is more than one method and different experiences and different preferences make people chose a different method. But, regardless which method you chose, make sure it fulfills your requirements, you understand it, and, most important of all, test it, test it and test it.

Last but not least: Remember that a disaster caused by nature is not the only bad thing that can happen to your database which will makes it necessary to be able to restore the database.

Heavy Regards, RealHeavyDude.
 

RealHeavyDude

Well-Known Member
Re: APW,AIW and BIW

No it won't. Each of these background writers is specially purposed to its job.

<snip>

Heavy Regards, RealHeavyDude.
 

raviraju

Member
Cannot do AIMAGE/2PHASE BEGIN. You must backup the database first. (834)

$ $DLC/bin/rfutil for-C roll forward -a /home/guest/ramesh/go/for.a3
PROGRESS Version 9.1E as of Tue Oct 12 17:19:22 EDT 2004


After-image dates for this after-image file: (1633)
Last AIMAGE BEGIN Thu Aug 16 11:38:59 2012 (1640)
Last AIMAGE NEW Thu Aug 16 11:42:16 2012 (1641)
This is aimage file number 3 since the last AIMAGE BEGIN. (1642)
This file was last opened for output on Thu Aug 16 11:42:16 2012. (1643)


1 notes were processed. (1634)
0 in-flight transactions. (3785)
0 transactions were started
0 transactions were ended
At the end of the .ai file, 0 of them were still active
Roll forward of the after-image busy extent is complete. (3786)
All roll forward for database foris complete. (3787)
$ $DLC/bin/rfutil for-C aimage list
PROGRESS Version 9.1E as of Tue Oct 12 17:19:22 EDT 2004


After imaging is not enabled for this database. (3803)
$ $DLC/bin/rfutil for-C aimage begin
PROGRESS Version 9.1E as of Tue Oct 12 17:19:22 EDT 2004


** Cannot do AIMAGE/2PHASE BEGIN. You must backup the database first. (834)

why this above error is coming??
 

RealHeavyDude

Well-Known Member
Re: Cannot do AIMAGE/2PHASE BEGIN. You must backup the database first. (834)

Because you did not backup that database or mark it as backed up.

Heavy Regards, RealHeavyDude.
 
Top