LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 08-24-2009, 04:38 PM   #1
quasi3
Member
 
Registered: Mar 2006
Posts: 41

Rep: Reputation: 16
rsync --link-dest not creating hard links on external usb drive


CentOS 5.2 64bit
2.6.18-92.el5xen

Use rsync with --link-dest for nightly backups, works well. Was recently asked to start weekly backups to an external drive for off-site storage. The regular syncing works but hard linking seems to be ignored. So the backup is long with no space saving advantage.

Here is an example of the command being run:

rsync --stats -axzvl --numeric-ids --delete --link-dest=/mnt/DISASTERBACKUPS/austinBackups/backups/2009-08-21 /AUSTINBACKUPS/backups/2009-08-24 /mnt/DISASTERBACKUPS/austinBackups/backups/


Can anyone see the issue here?

Last edited by quasi3; 08-24-2009 at 04:42 PM.
 
Old 08-24-2009, 11:40 PM   #2
emetib
Member
 
Registered: Feb 2003
Posts: 482

Rep: Reputation: 33
look at the man
you have to add a capital H

cheers.
 
Old 08-25-2009, 08:04 AM   #3
quasi3
Member
 
Registered: Mar 2006
Posts: 41

Original Poster
Rep: Reputation: 16
All the man says is 'preserve hard links' for -H

So in order for --link-dest to work on an external drive you have to have -H?
It works exactly as it is supposed to on the internal drive of the server without a -H.
 
Old 08-25-2009, 10:11 AM   #4
quasi3
Member
 
Registered: Mar 2006
Posts: 41

Original Poster
Rep: Reputation: 16
After some research It seems that -H is used if you are rsync'ing a directory that has hard links within itself. So if I wanted to copy the ENTIRE backup directory to disk and maintain the same space I would use -H because there are hard links inside. I do not want to copy the entire backup directory every time, just the latest daily backup and CREATE hard links to similar files on the external drive using --link-dest.
 
Old 08-26-2009, 10:11 AM   #5
quasi3
Member
 
Registered: Mar 2006
Posts: 41

Original Poster
Rep: Reputation: 16
SOLVED

Changed:
rsync --stats -axzvl --numeric-ids --delete --link-dest=/mnt/DISASTERBACKUPS/austinBackups/backups/2009-08-21 /AUSTINBACKUPS/backups/2009-08-24 /mnt/DISASTERBACKUPS/austinBackups/backups/

To:
rsync --stats -axzvl --numeric-ids --delete --link-dest=/mnt/DISASTERBACKUPS/austinBackups/backups/2009-08-21 /AUSTINBACKUPS/backups/2009-08-24/ /mnt/DISASTERBACKUPS/austinBackups/backups

Directory slashes needed to be different than what I was using for daily on-server backups.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Questions about rsync and '--link-dest' flag donnaaparis Linux - General 1 07-14-2011 12:55 PM
Problem using rsync for backups: link-dest JosephS Linux - Software 0 02-21-2008 07:43 AM
external enclosure for an internal hard drive vs external USB hard drive powah Linux - Hardware 1 03-10-2006 09:03 AM
Can't create symbolic link on my external hard drive yinglcs Linux - Newbie 15 01-09-2006 02:40 PM
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 08:48 AM


All times are GMT -5. The time now is 10:40 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration