LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-17-2008, 10:10 AM   #1
hendrixx
Member
 
Registered: Aug 2003
Location: Netherlands
Distribution: SuSE 10 Pro
Posts: 43

Rep: Reputation: 15
tar lots of data to multiple external harddrives (asking for next volume when full)


Hi,

I am looking for a tool or method (in Linux) to tar a large amount of data from our backupserver to external 1TB usb harddrives.
Once per month we want to make backups from our backup server (around 3,5TB) to 1TB usb drives. Is there a method, with tar for example, to automatically copy files to a 1TB usb drive and ask for a next drive when the usbdrive is full? Like in the old days with ARJ for example you could archive it to multiple floppy's and would automatically ask for a next volume when the floppy was full.

Now we are using tar to manually create a backup file of each of our servers (we have seperate directories per server on our backupserver) and then copy it to the usb drive. This is taking a very long time as we have to check each time if there is space left to copy the next tar file or that we have to switch to a new usb drive.

Ideal would be that the data on the usb drives is still accessible without using some kind of program to un-extract first.

Hope you understand my problem and have a solution.

Thx
 
Old 09-17-2008, 10:43 AM   #2
AuroraCA
Member
 
Registered: Jul 2008
Location: Northern CA USA
Distribution: Ubuntu, Slackware, Gentoo, Fedora, Red Hat, Puppy Linux
Posts: 370

Rep: Reputation: 35
If you have identical size hard drives you can use rsync with -a (archive) to archive the content of one drive to the next. The first time you run rsync -a the entire contents of the source drive will be copied to the backup drive with structure intact. The second time you run rsync -a only those files that have changed since the first rsync will be copied to the backup or archive disk.

If your source disks are 1 gig drives you can use 1 gig drives as backup and in this way gain a 1 to 1 copy of your originals. You can write a script to prompt for the second USB drive or just purchase an equal number of backup external USB drives as your source drives to do your backups. That way you don't need to be present to switch drives.

Alternatively, you could purchase a device such as:

Thermaltake BlacX N0028USU External Hard Drive SATA Enclosure Docking Station 2.5" & 3.5" USB 2.0 which will allow you to quickly swap bare SATA hard drives for backup and then store the bare hard drives off site. The external dock is available in USB or eSATA (external SATA) interface.

or you could install one of these in your server:

KINGWIN KF-1000-BK 3.5" Internal hot swap rack

which will allow you to insert bare removable SATA hard drives into your server for backups.
 
Old 09-18-2008, 03:17 AM   #3
hendrixx
Member
 
Registered: Aug 2003
Location: Netherlands
Distribution: SuSE 10 Pro
Posts: 43

Original Poster
Rep: Reputation: 15
Thx for the quick reply,

Quote:
Originally Posted by AuroraCA View Post
If you have identical size hard drives you can use rsync with -a (archive) to archive the content of one drive to the next. The first time you run rsync -a the entire contents of the source drive will be copied to the backup drive with structure intact. The second time you run rsync -a only those files that have changed since the first rsync will be copied to the backup or archive disk.

If your source disks are 1 gig drives you can use 1 gig drives as backup and in this way gain a 1 to 1 copy of your originals. You can write a script to prompt for the second USB drive or just purchase an equal number of backup external USB drives as your source drives to do your backups. That way you don't need to be present to switch drives.
We are already using rsync to backup to our backupserver.
Our backupserver has 16x 1TB in RAID-5 and Linux installed and has 1 large LVM disk of 13TB with XFS filesystem for backup. So i can not simply archive the content from one drive to another.

Quote:
Alternatively, you could purchase a device such as:

Thermaltake BlacX N0028USU External Hard Drive SATA Enclosure Docking Station 2.5" & 3.5" USB 2.0 which will allow you to quickly swap bare SATA hard drives for backup and then store the bare hard drives off site. The external dock is available in USB or eSATA (external SATA) interface.

or you could install one of these in your server:

KINGWIN KF-1000-BK 3.5" Internal hot swap rack

which will allow you to insert bare removable SATA hard drives into your server for backups.
For the same reason as i mentioned earlier i can not simply copy per disk. I think i really need some clever software solution or script to archive my backupfolder to my external usb drives.

Last edited by hendrixx; 09-18-2008 at 03:18 AM.
 
Old 09-19-2008, 07:50 PM   #4
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 483

Rep: Reputation: 153Reputation: 153
You should look at the dar program. It is similar to tar but is made for archiving to disks. While originally made for CD, DVD, etc. it supports backup slices into the GB, TB, and unbelievably beyond. It can be made to pause after a backup slice is written, allowing you to change USB drives. It also compresses files as they are written and allows individual extraction.

From the dar manpage:

-s, --slice <number>
Size of the slices in bytes. If the number is appended by k (or K), M, G, T,
P E, Z or Y the size is in kilobytes, megabytes, gigabytes, terabytes,
petabytes, exabytes, zettabytes or yottabytes respectively. Example: "20M"
means 20 megabytes, by default, it is the same as giving 20971520 as argument
(see also -aSI and -abinary options). If -s is not present the backup will be
written to a single slice whatever the size of the backup may be (there is
probably some filesystem limitation, thus you might expect problems for file
size over 2 gigabytes, depending on your filesystem, but this is not a limi-
tation of dar).


I also recommend you use eSATA external drives or SATA removable drives. USB is far too slow and obsolete for something this large. If you can fit a RAID cage into your backup server you could backup 3,4,5 removable 1TB disks at a time. If not look into external eSATA arrays with removable trays.
 
Old 09-29-2008, 04:53 PM   #5
hendrixx
Member
 
Registered: Aug 2003
Location: Netherlands
Distribution: SuSE 10 Pro
Posts: 43

Original Poster
Rep: Reputation: 15
Thx tofino_surfer,
this seems indeed the program that comes pretty close to what i was looking for!

Only drawbacks i can think of is that it stores the files in an archive across the drives so if i want to put back a single file or directory i have to extract it first. Haven't tried that yet, but i think i can overcome this.

Other thing is what happens if one of the disks get corrupt, will i still be able to recover the other undamaged data or is the entire backup broken and can not be recovered ?
This would be crucial to know, because else it would not be a reliable backup methode.

Last edited by hendrixx; 09-29-2008 at 04:54 PM.
 
Old 11-04-2008, 05:31 PM   #6
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 483

Rep: Reputation: 153Reputation: 153
You can extract any single file from the archive as long as you have the index from the first and last archive chunks. As these indexes are critical you could always store multiple copies of the index on different drives.

If you are worried about corruption of your backup drives and you should be, then you should use extra drives for RAID like redundancy of your backup. If you don't have extra backup drives for redundancy then your backup is less reliable then your RAID file server. If you buy two HDs for every dar backup chunk you will have a form of mirror.

Another more radical idea is not to use dar but rather make all of the HDs in your RAID based backup server removable. You could then buy multiple sets of drives and keep one set off site at all times. If you bought a 5 tray RAID cage with 5 extra trays with 10 1GB drives you could have two sets of 4GB capacity ( with RAID 5 ) backup disks. With RAID 5 one disk failure in either set wouldn't cause a problem. With RAID 6 you could have two failures without data loss. You could put a small 50-100MB boot partition on each of the drives so if one failed you could boot successfully from any of them. If you had the money you could make all 16 of your drives removable with multiple hot swap trays and buy 16 extra drives.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tar multiple volume archive - volume script RGummi Linux - General 2 08-31-2006 04:08 PM
Linux and External harddrives ?? mickeyboa Fedora 1 07-12-2006 08:25 PM
need some help with muli-volume tar (ubuntu, bash, gnu tar) MattCarp Linux - General 4 06-05-2006 08:15 AM
external firewire harddrives mrbass Linux - Hardware 1 07-14-2004 04:30 PM
Says harddrives full - but it's not I swear! nmoog Linux - General 2 10-27-2003 05:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration