Hello,
I'm trying to make remote backups without having to log in as root,
with plain rsync this works well using --rsync-path='sudo rsync'. This
way a script on the remote host (as seen in other solutions) is not
necessary. With rsnapshot however it does not work.
/etc/rsnapshot.conf:
config_version 1.2
snapshot_root /media/backups/
no_create_root 1
cmd_cp /bin/cp
cmd_rm /bin/rm
cmd_rsync /usr/bin/rsync
cmd_ssh /usr/bin/ssh
cmd_logger /usr/bin/logger
cmd_du /usr/bin/du
interval daily 7
verbose 2
loglevel 3
exclude /home/*/.Trash/
logfile /var/log/rsnapshot.log
rsync_short_args -av
rsync_long_args --delete --numeric-ids --delete-excluded --rsync-path='sudo rsync'
lockfile /var/run/rsnapshot.pid
backup backup < at > otherhost:/home/ otherhost/
root < at > hal:/root# rsnapshot -v daily
[...]
/usr/bin/rsync -av --delete --numeric-ids --relative --delete-excluded \
--rsync-path="sudo rsync" --exclude=/home/*/.Trash/ --rsh=/usr/bin/ssh \
backup < at > otherhost:/home /media/backups/daily.0/otherhost/
building file list ... rsync: link_stat "/root/rsync'" failed: No such file or directory (2)
rsync: link_stat "/root/backup < at > otherhost:/home" failed: No such file or directory (2)
done
sent 21 bytes received 20 bytes 82.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at main.c(892) [sender=2.6.8]
[...]
Apparently rsync from 'sudo rsync' is appended to the current
directory root and treated as a source, the same appears to happen
to backup < at > otherhost:/home which is not treated as a remote but a
local source and appended to the current directory as well.
If I copy and paste the displayed command, namely
/usr/bin/rsync -av --delete --numeric-ids --relative --delete-excluded \
--rsync-path='sudo rsync' --exclude=/home/*/.Trash/ --rsh=/usr/bin/ssh \
backup < at > otherhost:/home /media/backups/daily.0/otherhost/
it works as intended.
Can somebody enlighten me whats going wrong here?
Please CC me any replies.
TIA,
Johann
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
