rsync and symbolic links
Gerhard Wiesinger
lists at wiesinger.com
Sat Nov 4 09:29:15 GMT 2006
Hello!
I'm using rsync to generate a backup.
DATE=`date +%Y.%m.%d.%H.%M.%S`
cat files.txt | rsync -avz -e ssh --include-from=- / root at myserver:/backup/$DATE
files.txt contains e.g.:
- /home/user1
+ etc/
+ etc/*
+ etc/.*
+ etc/*/
+ etc/*/*
+ etc/*/.*
+ etc/**/
+ etc/**/*
+ etc/**/.*
+ boot/
+ boot/*
+ boot/.*
+ boot/*/
+ boot/*/*
+ boot/*/.*
+ boot/**/
+ boot/**/*
+ boot/**/.*
+ dev/
+ dev/*
+ dev/.*
+ dev/*/
+ dev/*/*
+ dev/*/.*
+ dev/**/
+ dev/**/*
+ dev/**/.*
.... some other stuff here
.... some other stuff here
.... some other stuff here
- *
- ".*"
Now I've a symbolic link in directory /etc/myapp.conf which points to e.g.
/var/directory1/myapp.conf
How can I backup:
1.) the symbolic link itself (/etc/myapp.conf)
2.) And the file /var/directory1/myapp.conf
This should also apply for directory symbolic links.
Does it work with --links and with --copy-links? (I tried it, but it
recurses in /dev/ ...)
Thnx.
Ciao,
Gerhard
--
http://www.wiesinger.com/
More information about the rsync
mailing list