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.
Author |
Topic |
Mountain_Nerd
Starting Member
28 Posts |
Posted - 2006-01-04 : 17:33:36
|
We currently use Veritas backups for our local system quite successfully, but I am trying to establish an off-site repository for backups of our databases.I am doing full SQL Server backups each weekend and FTP-ing the files over a WAN to another facility that doesn't have SQL Server. One of my database backup files is about 12 GB. Unfortunately, the remote site is a NetWare 5.1 file server - with "traditional" (as in non-NSS) volumes which have an inherent file size limit of approx. 4 GB. Unfortunately, the remote site is not in a position to upgrade this server at the moment - as NetWare NSS volumes (NetWare 6.x and above) have file size limits in the TB range.So... does anyone have a way to partition a backup to various files OR to "break apart" a backup file in a fashion that will enable it to be put back together again? Or perhaps one of you have a better, more creative idea...Thanks,Chris |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-01-04 : 17:57:31
|
You can specify multiple files. Please see BACKUP DATABASE command in SQL Server Books Online for more details. Here is some information:quote: BACKUP DATABASE { database_name | @database_name_var } TO < backup_device > [ ,...n ]
quote: When specifying multiple files, logical file names (or variables) and physical file names (or variables) can be mixed. However, all devices must be of the same type (disk, tape, or pipe).nIs a placeholder that indicates multiple backup devices may be specified. The maximum number of backup devices is 64.
Tara Kizeraka tduggan |
 |
|
Mountain_Nerd
Starting Member
28 Posts |
Posted - 2006-01-04 : 18:05:33
|
Thanks for the reply Tara. Yeah, I saw that, but how does it work with files? If I specify four files and the backup is 12 GB, does it just partition it so that I get four 3 GB files? The details were a little sketchy in BOL. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-01-04 : 18:21:06
|
The best way to find out these things is to test it. Here is my test. I've got a database named GT. The path to the instance is E:\MSSQL$GTW1. This database is just under 1GB in size. I created 4 backup devices. After the below code ran, each backup file was approximately 233MB in size. Here is the code:USE masterGOEXEC sp_addumpdevice 'disk', 'GT1', 'E:\MSSQL$GTW1\BACKUP\GT1.dat'EXEC sp_addumpdevice 'disk', 'GT2', 'E:\MSSQL$GTW1\BACKUP\GT2.dat'EXEC sp_addumpdevice 'disk', 'GT3', 'E:\MSSQL$GTW1\BACKUP\GT3.dat'EXEC sp_addumpdevice 'disk', 'GT4', 'E:\MSSQL$GTW1\BACKUP\GT4.dat'BACKUP DATABASE GTTO GT1, GT2, GT3, GT4 Tara Kizeraka tduggan |
 |
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2006-01-04 : 19:10:08
|
You could use PKZIP (command line) to compress the database backup. Database backup files will usually compress to about 20% or less of the original file size, so you should end up with a file of less than 3 GB that the NetWare server could handle. You would need PKZIP 5.0 or greater to be able to handle files of more than 2 GB.The disadvantage is that you would need an extra step to compress the backup file. This can be done automatically in a job by using the XP_CMDSHELL stored proc to execute PKZIP.A big advantage is that it should take less time to FTP the much smaller file over the WAN link. I used this technique to transfer daily database backups from a remote site that did not have a tape backup system to a central facility to be saved on tape.As an alternative, you could consider using LiteSpeed backup software to create on-the-fly compressed backups. That will cost more money than PKZIP, but there are a number of advantages to using it.CODO ERGO SUM |
 |
|
Mountain_Nerd
Starting Member
28 Posts |
Posted - 2006-01-05 : 10:50:35
|
quote: Originally posted by tkizer The best way to find out these things is to test it.
Thanks for the help. I think part of my difficulty in determining my next step was that I was dumping the backups directly to file rather than using a file-based backup device. BACKUP DATABASE mydb TO DISK = 'F:\weeklybackup\mydb.BAK' WITH INIT Perhaps this is a bad practice. Nevertheless, it was what was creating my mental hurdle, because, apparently, you can NOT use:BACKUP DATABASE mydb TO DISK = 'F:\weeklybackup\mydb1.BAK', 'F:\weeklybackup\mydb1.BAK' WITH INIT Indeed, it does partition it as expected. I created six file-based devices so I can still successfully transfer should the backup size double. The resultant file sizes were each about 2 GB.USE masterGOEXEC sp_addumpdevice 'disk', 'devnet1', 'F:\weeklybackup\devnet1.BAK'EXEC sp_addumpdevice 'disk', 'devnet2', 'F:\weeklybackup\devnet2.BAK'EXEC sp_addumpdevice 'disk', 'devnet3', 'F:\weeklybackup\devnet3.BAK'EXEC sp_addumpdevice 'disk', 'devnet4', 'F:\weeklybackup\devnet4.BAK'EXEC sp_addumpdevice 'disk', 'devnet5', 'F:\weeklybackup\devnet5.BAK'EXEC sp_addumpdevice 'disk', 'devnet6', 'F:\weeklybackup\devnet6.BAK'BACKUP DATABASE devnet TO devnet1, devnet2, devnet3, devnet4, devnet5, devnet6WITH INIT Michael Valentine Jones: Thanks for the idea. Although the idea of smaller file sizes is very appealing, at this point, I'd like to seek a SQL Server solution. When all is said and done, I think I'll likely employ BOTH partitioned backups AND command line compression (especially since it is a cheap solution). Thankfully, my weekly backups and file transfers are done during off-hours and the flood of the network is without consequence.Thanks for your assistance with all of this. Regards,Chris |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-01-05 : 13:36:38
|
Chris, I had the same problem as you trying to backup to file rather than devices. I haven't used devices since 6.5. I guess you need them if you want to back the databases up to multiple files.Tara Kizeraka tduggan |
 |
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2006-01-05 : 20:46:41
|
There is no need to define backup devices to backup to multiple files.The following backup command worked fine for me:backup database msdb to disk = 'C:\temp\msdb_1.bak', disk = 'C:\temp\msdb_2.bak', disk = 'C:\temp\msdb_3.bak', disk = 'C:\temp\msdb_4.bak', disk = 'C:\temp\msdb_5.bak', disk = 'C:\temp\msdb_6.bak', disk = 'C:\temp\msdb_7.bak', disk = 'C:\temp\msdb_8.bak'with init, stats CODO ERGO SUM |
 |
|
Mountain_Nerd
Starting Member
28 Posts |
Posted - 2006-01-06 : 14:43:50
|
quote: Originally posted by Michael Valentine Jones
backup database msdb to disk = 'C:\temp\msdb_1.bak', disk = 'C:\temp\msdb_2.bak',
Ooooohhhhh. That's good. That's one permutation I didn't try. I should have guessed. Thanks a ton. I like that solution even better because I could use something like xp_getfiledetails on the previous backup files to add additional backup files as each one approaches 4 GB -- essentially paritioning into the correct number of partitions on the fly. I'll have to ponder that one a bit more, but thanks! |
 |
|
|
|
|
|
|