SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
remote backup with a non-root user and s
Author Message
Post remote backup with a non-root user and s 
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

Post remote backup with a non-root user and s 
Today at 10:04pm, Johann Gile said:

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.

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.

You might try putting the full path of those executables in there. Instead
of 'sudo rsync', it would be something kind of similar to
'/usr/local/bin/sudo /usr/local/bin/rsync' with the proper paths for your
system inserted instead of mine.

Mac

--
Mac Newbold MNE - Mac Newbold Enterprises, LLC
mac < at > macnewbold.com http://www.macnewbold.com/

-------------------------------------------------------------------------
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

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB