We're looking to backup about 100gb+ of data containing small files (10kb+) each. The backup needs to be done as fast as possible to another harddrive weekly. Which is the better (especially speed wise) way to backup in such scenario? Rsync, or tar?

link|improve this question
feedback

5 Answers

rsync can be somewhat painful if you have a very large number of files - especially if your rsync version is lower than 3. On the other hand: if you use tar, you would generate a very big resulting tar-file (unless the data may be compressed a lot). Personally, I would look at rdiff-backup, but make sure that you test your restore situation: rdiff-backup can be very memory demanding when restoring.

link|improve this answer
feedback

Definitely rsync.

The advantage of rsync is that it will copy only the files which have changed.

If you have 100GB+ of relatively small files, you don't want to copy them all each time.

Note: the first backup with rsync will be slow because all files are copied. Subsequently only the changed files are copied, and they can be compressed during the copy.

Be sure to familiarise yourself with all the options of rsync ... there are many.

Tar is an archive utility. You could conceivably create a tar file for the entire 100GB+, but you don't want to transfer it all, each time.

link|improve this answer
feedback

if your files do not change much - i would vote for rsync.

link|improve this answer
feedback

Do you need history (multiple backups) or just a plain copy of your data to some other disk? Backing up 100GB of 10KB files would take ages if you don't use a block level backup. Think about making block level snapshots or some other block level based solution, if you really need a fast solution.

link|improve this answer
Do not need a history, just a plain copy of data to a secondary harddisk mounted on the server. Any suggestioon on a faster solution? – Paatrick Jan 5 '10 at 13:51
``dd=/dev/sdX of=/dev/sdY'' in a cron job should be the fastest solution since it's block level copy if sdX being copied to sdY. Benchmark that against a tar'ed or rsync'd copy. – pfo Jan 5 '10 at 14:03
1  
for a general use (home directories) rsync works fine even for several terabytes of data (including a mix of small and big files). – wazoox Jan 5 '10 at 14:09
Can you take a block level backup of just certain folders? – Svish Jan 5 '10 at 14:12
1  
Block-level backups by design only work for entire filesystems, not single directories. This is especially true for simple solutions like "dd if=/dev/foo of=/dev/bar" but AFAIK also for the more advanced Snapshot-based products from NetApp, EMC and the like. – daff Jan 11 '10 at 5:49
feedback

Take a look at rsnapshot, it's just a script that you can use as front for rsync. It will only backup stuff that has changed and rotate your backups.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown