Help with rsync using link-dest


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Help with rsync using link-dest
# 1  
Old 05-09-2012
Help with rsync using link-dest

Hi,

I'm trying to keep backups of my home directory (i.e. back it up every day or so) using rsync with link-dest.

This is how I do it,

Code:
rsync -avh --delete --link-dest=/media/disk/oldbackup/ /home/user/ /media/disk/newbackup
rm -f /media/disk/oldbackup
ln -s newbackup /media/disk/oldbackup/

The problem is when I do this it seems to just copy my entire home directory again (as in every time I do a backup it copies everything again, rather I only want the changes to be copied and the others linked). It appears that I'm not creating hardlinks. What am I doing wrong?

Thanks
# 2  
Old 05-09-2012
Quote:
Originally Posted by lost.identity
Hi,

I'm trying to keep backups of my home directory (i.e. back it up every day or so) using rsync with link-dest.

This is how I do it,

Code:
rsync -avh --delete --link-dest=/media/disk/oldbackup/ /home/user/ /media/disk/newbackup
rm -f /media/disk/oldbackup
ln -s newbackup /media/disk/oldbackup/

The problem is when I do this it seems to just copy my entire home directory again (as in every time I do a backup it copies everything again, rather I only want the changes to be copied and the others linked). It appears that I'm not creating hardlinks. What am I doing wrong?

Thanks
can you use options "-zavrR" instead?

also, try to see what's going on using '--verbose' option as well.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Rsync Error: rsync: link_stat failed: No such file or directory (2)

I wish to copy all the files & folder under /web/Transfer_Files/data/ on mymac1 (Linux) to remote server mybank.intra.com (Solaris 10) /tmp/ location I am using Ansible tool synchronize module which triggers the unix rsync command as below:rsync --delay-updates -F --compress --archive --rsh=ssh... (2 Replies)
Discussion started by: mohtashims
2 Replies

2. Solaris

/var/adm/messages (insterface turned off/restored) and link up & link down message.

Hi All I am facing an issue with our new solaris machine. in /var/adm/messages Apr 22 16:43:05 Prod-App1 in.routed: interface net0 to 172.16.101.1 turned off Apr 22 16:43:33 Prod-App1 mac: NOTICE: nxge0 link up, 1000 Mbps, full duplex Apr 22 16:43:34 Prod-App1 mac: NOTICE: nxge0 link... (2 Replies)
Discussion started by: javeedkaleem
2 Replies

3. Solaris

/var/adm/messages (interface turned off/restored) and link up & link down message.

Hi All I am facing an issue with our new solaris machine. in /var/adm/messages root@Prod-App1:/var/tmp# root@Prod-App1:/var/tmp# root@Prod-App1:/var/tmp# cat /var/adm//messages Apr 20 03:10:01 Prod-App1 syslogd: line 25: WARNING: loghost could not be resolved Apr 20 08:24:18 Prod-App1... (0 Replies)
Discussion started by: javeedkaleem
0 Replies

4. Shell Programming and Scripting

Using rsync --link-dest pointing to a remote server

Ok, I'm trying to figure out how to reference a remote file using the rsync --link-dest parameter. Here is the code I have so far: # # FILESERVER INCREMENTAL BACKUP SCRIPT # # Remove previous log file rm /usr/local/bin/rsync-incremental.log # Set daily variables DAY0=`date -I`... (6 Replies)
Discussion started by: Orionizer
6 Replies

5. UNIX for Dummies Questions & Answers

[Solved] Symbolic link not allowed or link target not accessible

Hi everybody, I read about treads realted to this issue but they did not resovle issue given below. Please help me resolve issue given below I have html file under /srv/www/htdocs/actual_folder ls actual_folder/ test.html and following link works... (0 Replies)
Discussion started by: newbielgn
0 Replies

6. Programming

g++ fails to link to static library when compilation and link in single command

Hello All, I've encountered a strange behaviour from g++ that doesn't make sense to me. Maybe you can shed some light on it: I have a bunch of source files and want to compile them and link them with a static library liba.a located in /usr/local/lib64 into an executable Approach 1 works... (0 Replies)
Discussion started by: magelord
0 Replies

7. Shell Programming and Scripting

makefile sourc and dest are in different directory

Hi, in makefile, if the sourc and dest in different directory, no matter the source file changed or not, it seems the dest always been build, how do you resolve this? Thanks. peter (1 Reply)
Discussion started by: laopi
1 Replies

8. IP Networking

Can I use 2 different id's in .netrc for same dest. machine.

I have 2 different id's for an ftp destination. Each id handles files differently on the destinations end. Is it possible to have one destination machine and assign an alias name for each id. The .netrc file doesn't allow this. (2 Replies)
Discussion started by: wangotango
2 Replies

9. UNIX for Dummies Questions & Answers

rsync with --link-dest doesn't create hard links

I have been experimenting with rsync as a scriptable backup option, reading various example and tips pages, including Time Machine for every Unix out there - IMHO That page seems to describe the exact behavior I want: The ability to make a "full backup" snapshot regularly, but with rsync... (0 Replies)
Discussion started by: fitzwilliam
0 Replies

10. UNIX for Dummies Questions & Answers

Difference between hard link and soft link in unix

Hi All, Can any one please explain me what is the difference between hard link and soft link in UNIX. Thanks in advance Raja Chokalingam. (2 Replies)
Discussion started by: RAJACHOKALINGAM
2 Replies
Login or Register to Ask a Question