Friday, February 10, 2012

backup to device

I am using a device to backup my user database for both data and the transaction log. I want to automate this process and I understand the syntax for the backup of log and data. I want to know what the syntax is for having the complete backup overwrite the existing backup in the device after a number of backups have occured. I can't find anything in the users manual for this. I also want to have my transaction log backups be overwritten periodically. With my current setup the backup device grows and grows
For example
after the third data backup I want the first backup to be overwritten so the device only contains that last three backups. I will backup the transaction log 2x per day, and I want to keep that last 6 transaction log backups to be stored on the device and then the oldest transaction log backup in the device will be overwritten.
thanks>after the third data backup I want the first backup to be overwritten so
the device only contains that last three backups.
I don't think this is doable. When you do backup you use WITH INIT or WITH
NOINIT to tell backup to orverwrite or append to the backup device. No way
you can tell it to purge the first backup set (if there are 3 exist) and
append a new backup set to the backup device. Similar to the log backup.
One thing you can do is you have 3 backup devices for each day. Lets say
you have BACKUP1, BACKUP2, BACKUP3. Do a full backup and 2 log backups
(appended) to each backup device every day. Schedule a job to run full
backup and another job to do log backup. Before each backup do an IF..ELSE
to find out what backup device was used the day before so your backup will
know what backup device to use today.
hth,
"Stephen Harris" <anonymous@.discussions.microsoft.com> wrote in message
news:2C185839-AF58-4269-B4B3-EA0335036FB3@.microsoft.com...
> I am using a device to backup my user database for both data and the
transaction log. I want to automate this process and I understand the
syntax for the backup of log and data. I want to know what the syntax is
for having the complete backup overwrite the existing backup in the device
after a number of backups have occured. I can't find anything in the users
manual for this. I also want to have my transaction log backups be
overwritten periodically. With my current setup the backup device grows and
grows.
> For example,
> after the third data backup I want the first backup to be overwritten so
the device only contains that last three backups. I will backup the
transaction log 2x per day, and I want to keep that last 6 transaction log
backups to be stored on the device and then the oldest transaction log
backup in the device will be overwritten.
> thanks

No comments:

Post a Comment