Skip to Content
avatar image
Former Member

Backup to local disk, how to overwrite the old backups?

Hi evrybody, i hope this is the correct forum for my question,

in my dev machine with win2000, oracle 9.2.x and 4.6C running I am doing complete offline backup to a local USB disk every week.

The backup is working, in my backup dir i can found the \SID directory with the logs of the backups, and a directory for every backup done called somthing like \bebdxxx.

I see that the new backup never overwrite any of the old one, so obviously the disk is growing on size.

The only value that I think have to do with this in my init<SID>.sap is expir_period that is currently = 1.

I would like to set a number of day in which keep the backup, but later than that when doing a new backup i want to overwrite the old one, or delete the old one and do the new backup.

Or otherwise always overwrite the old backup.

Any suggestion?

Thanks in advance, Arturo Bardelli

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Sep 01, 2009 at 05:45 PM

    > Or otherwise always overwrite the old backup.

    > Any suggestion?

    Hello Arturo,

    overwriting an old backup really is the worst thing you can do.

    What if something is wrong with your new backup?

    What if you start to take the new backup, partially overwrite the old (good) one and then your dev box crashes and the database needs a restore?

    No, overwriting backups is utmost nonsense!

    So, what can you do here?

    Well, usually backups to local disks are meant to serve as intermediate backup locations from where you save the backuped files to the real backup medium e.g. a tape.

    After this real backup it's safe to delete the file system backup.

    With brbackup you can do that (save to tape and delete filesystem copy) with the -bd (backup_delete) action. (reading the [documentation|http://help.sap.com/saphelp_erp2004/helpdata/en/44/d8f1902adc11d29fe90000e8a5ae06/content.htm] helps... )

    If you're really going to stick with your "USB-BACKUP-SOLUTION" (the wording alone is funny - ever wondered where you would get your data back from, if, say there is a fire in the server room?), then you may want to use the -db (delete_backup) action. (again... the [documentation|http://help.sap.com/saphelp_erp2004/helpdata/en/38/2fe03a00281877e10000000a11402f/content.htm] has it all...).

    But please - don't use this action with the option "last", as this would simply delete the last successfull backup...

    regards,

    Lars

    Add comment
    10|10000 characters needed characters exceeded

    • > Instead if I use a script that copy the last backup to another location, and after I schedule a command like " BRBACKUP -db last " maybe is going to work completely in automatic.

      Yes, that should work.

      > Do you know if is possible to schedule a command like that by DB13? Or I should schedule an extern comand from sm36, or by operating system?

      DB13 is not a general scheduler but just offers the build-in commands.

      Therefore, if you want to schedule a home-grown script, you've to resort to other schedulers, e.g. the windows task scheduler.

      regards,

      Lars