Greetings.

I wrote a script that make remote backups with rsync. I have 2 main problems with it

1) I want that the destination directory (on the repository machine) recreate the backed up file path and it permission (I use -R here )

2) Is there a way to "follow" all the links using -R and -a parameters..??

Currently I am using something like this.

rsync -al --delete --copy-unsafe-links --rsh=/usr/bin/ssh -R --delete-excluded -vv --delete /etc/* [EMAIL PROTECTED]:/usr/local/src/


Lokk ath some part of the output



copying unsafe symlink "/etc/php4/lib" -> "/usr/lib/apache-extramodules"
copying unsafe symlink "/etc/rmt" -> "/usr/sbin/rmt"
copying unsafe symlink "/etc/runlevels/boot/keymaps" -> "/etc/init.d/keymaps"
copying unsafe symlink "/etc/runlevels/boot/clock" -> "/etc/init.d/clock"
copying unsafe symlink "/etc/runlevels/boot/localmount" -> "/etc/init.d/localmount"
copying unsafe symlink "/etc/runlevels/boot/consolefont" -> "/etc/init.d/consolefont"
copying unsafe symlink "/etc/runlevels/boot/modules" -> "/etc/init.d/modules"
copying unsafe symlink "/etc/runlevels/boot/hostname" -> "/etc/init.d/hostname"
copying unsafe symlink "/etc/runlevels/boot/net.lo" -> "/etc/init.d/net.lo"
copying unsafe symlink "/etc/runlevels/boot/serial" -> "/etc/init.d/serial"
copying unsafe symlink "/etc/runlevels/boot/urandom" -> "/etc/init.d/urandom"
copying unsafe symlink "/etc/runlevels/boot/checkroot" -> "/etc/init.d/checkroot"
copying unsafe symlink "/etc/runlevels/boot/rmnologin" -> "/etc/init.d/rmnologin"
copying unsafe symlink "/etc/runlevels/boot/bootmisc" -> "/etc/init.d/bootmisc"
copying unsafe symlink "/etc/runlevels/boot/checkfs" -> "/etc/init.d/checkfs"
copying unsafe symlink "/etc/runlevels/default/gpm" -> "/etc/init.d/gpm"
copying unsafe symlink "/etc/runlevels/default/local" -> "/etc/init.d/local"
copying unsafe symlink "/etc/runlevels/default/named" -> "/etc/init.d/named"
copying unsafe symlink "/etc/runlevels/default/net.eth0" -> "/etc/init.d/net.eth0"
copying unsafe symlink "/etc/runlevels/default/sysklogd" -> "/etc/init.d/sysklogd"
copying unsafe symlink "/etc/runlevels/default/netmount" -> "/etc/init.d/netmount"
copying unsafe symlink "/etc/runlevels/nonetwork/local" -> "/etc/init.d/local"


and if I see /etc on the source server
s -la /etc/runlevels/default/
total 1
drwxr-xr-x 2 root root 216 Feb 12 21:02 .
drwxr-xr-x 6 root root 152 Dec 3 11:45 ..
-rw-r--r-- 1 root root 0 Dec 4 06:51 .keep
lrwxrwxrwx 1 root root 15 Feb 9 16:39 gpm -> /etc/init.d/gpm
lrwxrwxrwx 1 root root 17 Dec 31 1998 local -> /etc/init.d/local
lrwxrwxrwx 1 root root 17 Feb 12 21:02 named -> /etc/init.d/named
lrwxrwxrwx 1 root root 20 Dec 31 1998 net.eth0 -> /etc/init.d/net.eth0
lrwxrwxrwx 1 root root 20 Dec 31 1998 netmount -> /etc/init.d/netmount
lrwxrwxrwx 1 root root 20 Dec 31 1998 sysklogd -> /etc/init.d/sysklogd




and on the /etc/ directory on the destination
 ls -la runlevels/default/
total 25
drwxr-xr-x    2 root     root          216 Feb 12 21:02 .
drwxr-xr-x    6 root     root          152 Dec  3 11:45 ..
-rw-r--r--    1 root     root            0 Dec  4 06:51 .keep
-rwxr-xr-x    1 root     root          958 Feb  8 23:12 gpm
-rwxr-xr-x    1 root     root          727 Dec  4 06:51 local
-rwxr-xr-x    1 root     root         1378 Feb 11 21:00 named
-rwxr-xr-x    1 root     root         3669 Dec  4 06:51 net.eth0
-rwxr-xr-x    1 root     root         2580 Dec  4 06:51 netmount
-rwxr-xr-x    1 root     root          962 Dec 31  1998 sysklogd


Is there a way to maintain the simlinks that the source server have..??
I should use the -R flag to maintain the source server directory structure on the storage server...


Thanks a lot

--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

Reply via email to