Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Restoring to Remote DB

Author  Topic 

gypo
Starting Member

9 Posts

Posted - 2008-08-27 : 07:20:52
Hi

I have a live DB that is having a full backup at midnight and a transaction backup every hour in between.

I am currently truncating the trans logs before the full backup, but I can stop that if I need to.

What I would like to do is: after each trans backup restore the trans backup to a backup DB (the backup DB is not located on the same network so I will need to write scripts to FTP files about - unless there is another way to do it?).

I suppose the main question is:
Can I just load the trans backups even though a full backup has occured? Or, each time a full back up occurs i need to restore from the full backup?

The full backup is currently at 17GB so it is unreasonable to try and move that file about.

Hopefully somebody has had a similar scenario to this...

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-08-27 : 08:26:36
Easier to restore next full backup which will capture everything in Other server.
Go to Top of Page

gypo
Starting Member

9 Posts

Posted - 2008-08-27 : 09:38:52
Thanks sodeep. Because of the size of the full backup, I can't move it to the remote server. Also the idea is that I have a backup server waiting to go in the case of a failure.

Any other ideas?
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-08-27 : 10:06:45
quote:
Originally posted by gypo

Thanks sodeep. Because of the size of the full backup, I can't move it to the remote server. Also the idea is that I have a backup server waiting to go in the case of a failure.

Any other ideas?



Then compress it with Winzip or Winrar and copy backup files and restore it.
Go to Top of Page

tfountain
Constraint Violating Yak Guru

491 Posts

Posted - 2008-08-27 : 15:35:21
gypo,

If you're looking to create a standby or failover server, you would be better off looking into the technologies to accomplish this, whether it be an active/active cluster, active/passive cluster or data mirroring (to a standby).

On another note, we have a concept like this for a reporting server that we do a full backup and restore of 4 major databases from our live production server (that is on an active/passive cluster) to a read only server. This is for reporting purposes and the backup is done once a day. We copy about 80GB of data files nightly and the entire process takes about 1 hour. This is for the backup, file copy, restore and database shrink statements for all 4 databases. So copying 17GB of files is nothing. The only thing you will need to make sure is that your network has the bandwidth to handle this. I had to have our network guys upgrade the entire switch our servers where on to a full 1GB switch to make this practical.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-27 : 16:10:11
quote:
Originally posted by gypo

I am currently truncating the trans logs before the full backup, but I can stop that if I need to.

What I would like to do is: after each trans backup restore the trans backup to a backup DB (the backup DB is not located on the same network so I will need to write scripts to FTP files about - unless there is another way to do it?).



There is no point in truncating the transaction log before a full backup. Please explain what your intention is for that step. It makes no sense as you are breaking the transaction log backup chain.

quote:
Originally posted by gypo


I suppose the main question is:
Can I just load the trans backups even though a full backup has occured? Or, each time a full back up occurs i need to restore from the full backup?



Yes that is possible but not with your current setup. You must stop truncating the transaction log.

You must start with a full backup though, so you'll need to copy it once and then restore that.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

gypo
Starting Member

9 Posts

Posted - 2008-08-28 : 06:12:28
quote:
Originally posted by tfountain

gypo,

If you're looking to create a standby or failover server, you would be better off looking into the technologies to accomplish this, whether it be an active/active cluster, active/passive cluster or data mirroring (to a standby).

On another note, we have a concept like this for a reporting server that we do a full backup and restore of 4 major databases from our live production server (that is on an active/passive cluster) to a read only server. This is for reporting purposes and the backup is done once a day. We copy about 80GB of data files nightly and the entire process takes about 1 hour. This is for the backup, file copy, restore and database shrink statements for all 4 databases. So copying 17GB of files is nothing. The only thing you will need to make sure is that your network has the bandwidth to handle this. I had to have our network guys upgrade the entire switch our servers where on to a full 1GB switch to make this practical.



The issue I have is that I need to use a normal broadband connection to get to the failover server - unfortunately I don't have the luxury of an internal corporate network :(
Go to Top of Page

gypo
Starting Member

9 Posts

Posted - 2008-08-28 : 06:20:09
quote:
Originally posted by tkizer

quote:
Originally posted by gypo

I am currently truncating the trans logs before the full backup, but I can stop that if I need to.

What I would like to do is: after each trans backup restore the trans backup to a backup DB (the backup DB is not located on the same network so I will need to write scripts to FTP files about - unless there is another way to do it?).



There is no point in truncating the transaction log before a full backup. Please explain what your intention is for that step. It makes no sense as you are breaking the transaction log backup chain.

quote:
Originally posted by gypo


I suppose the main question is:
Can I just load the trans backups even though a full backup has occured? Or, each time a full back up occurs i need to restore from the full backup?



Yes that is possible but not with your current setup. You must stop truncating the transaction log.

You must start with a full backup though, so you'll need to copy it once and then restore that.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog




There's no big picture as to why I am truncing the trans logs - I am happy to stop that process :)

Do I need any specific config on the DB to achieve a continuous reload of the trans logs? Here are the scripts I am currently using:
Backups:

-- Do full backup
BACKUP DATABASE [MyDB]
TO DISK = 'F:\DB.BAK'
WITH NOFORMAT, INIT,
NAME = N'Full Database Backup',
SKIP, NOREWIND, NOUNLOAD, STATS = 10

-- Do transactional backup
BACKUP LOG [MyDB]
TO DISK = N'F:\DB.TRN'
WITH NOFORMAT, INIT,
NAME = N'Transaction Log Backup',
SKIP, NOREWIND, NOUNLOAD, STATS = 10


Restoring:

-- Restore full backup
RESTORE DATABASE [MyDB]
FROM DISK = N'F:\DB.BAK'
WITH
FILE = 1,
NORECOVERY,
NOUNLOAD,
REPLACE,
STATS = 10
GO

-- Restore logs
RESTORE LOG [MyDB] FROM DISK = N'F:\DB_1.TRN' WITH FILE = 1,NORECOVERY,NOUNLOAD,STATS = 10
GO
RESTORE LOG [MyDB] FROM DISK = N'F:\DB_2.TRN' WITH FILE = 1,RECOVERY,NOUNLOAD,STATS = 10
GO


You'll see in the restores I am using NORECOVERY and then RECOVERY on the last statement. If I don't do that I get a backup not part of media set error.

Thanks :)
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-28 : 10:54:18
To get a continuous chain of the tlogs, you just need to stop truncating the logs.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -