Saturday, February 25, 2012

backup and restore

On a production server, I do a full backup monthly and then delete data
from the tables that is older than the current date. On a separate
non-production server I restored the initial full backup. My question
is how can I add/restore the subsequent backups to the non-production
server with out stepping on the data that was initially restored?
Thanks,
Daniel<danielsmith611@.gmail.com> wrote in message
news:1155141011.175566.161350@.m73g2000cwd.googlegroups.com...
> On a production server, I do a full backup monthly and then delete data
> from the tables that is older than the current date. On a separate
> non-production server I restored the initial full backup. My question
> is how can I add/restore the subsequent backups to the non-production
> server with out stepping on the data that was initially restored?
>
RESTORE WITH MOVE, followed perhaps by merging the data.
EG
BACKUP DATABASE AdventureWorks
TO AdventureWorksBackups ;
RESTORE DATABASE AdventureWorks_200608
FROM AdventureWorksBackups
WITH MOVE 'AdventureWorks_Data' TO
'C:\MySQLServer\AdventureWorks_200608.mdf',
MOVE 'AdventureWorks_Log' TO 'C:\MySQLServer\AdventureWorks_200608.ldf';
David|||Do you have an example of the merge?
David Browne wrote:
> <danielsmith611@.gmail.com> wrote in message
> news:1155141011.175566.161350@.m73g2000cwd.googlegroups.com...
> > On a production server, I do a full backup monthly and then delete data
> > from the tables that is older than the current date. On a separate
> > non-production server I restored the initial full backup. My question
> > is how can I add/restore the subsequent backups to the non-production
> > server with out stepping on the data that was initially restored?
> >
>
> RESTORE WITH MOVE, followed perhaps by merging the data.
>
> EG
> BACKUP DATABASE AdventureWorks
> TO AdventureWorksBackups ;
>
> RESTORE DATABASE AdventureWorks_200608
> FROM AdventureWorksBackups
> WITH MOVE 'AdventureWorks_Data' TO
> 'C:\MySQLServer\AdventureWorks_200608.mdf',
> MOVE 'AdventureWorks_Log' TO 'C:\MySQLServer\AdventureWorks_200608.ldf';
>
> David|||Or would log shipping work?
danielp wrote:
> Do you have an example of the merge?
> David Browne wrote:
> > <danielsmith611@.gmail.com> wrote in message
> > news:1155141011.175566.161350@.m73g2000cwd.googlegroups.com...
> > > On a production server, I do a full backup monthly and then delete data
> > > from the tables that is older than the current date. On a separate
> > > non-production server I restored the initial full backup. My question
> > > is how can I add/restore the subsequent backups to the non-production
> > > server with out stepping on the data that was initially restored?
> > >
> >
> >
> > RESTORE WITH MOVE, followed perhaps by merging the data.
> >
> >
> > EG
> >
> > BACKUP DATABASE AdventureWorks
> > TO AdventureWorksBackups ;
> >
> >
> > RESTORE DATABASE AdventureWorks_200608
> > FROM AdventureWorksBackups
> > WITH MOVE 'AdventureWorks_Data' TO
> > 'C:\MySQLServer\AdventureWorks_200608.mdf',
> > MOVE 'AdventureWorks_Log' TO 'C:\MySQLServer\AdventureWorks_200608.ldf';
> >
> >
> > David|||"danielp" <danielsmith611@.gmail.com> wrote in message
news:1155158638.423828.3310@.h48g2000cwc.googlegroups.com...
> Or would log shipping work?
No. Your deletes would get shipped.
David|||"danielp" <danielsmith611@.gmail.com> wrote in message
news:1155149678.373420.184490@.i3g2000cwc.googlegroups.com...
> Do you have an example of the merge?
It's just SQL, or perhaps an SSIS package. What do the tables look like?
David

No comments:

Post a Comment