SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
rsnapshot as local user
Author Message
Post rsnapshot as local user 
Is anybody out there backing up rsnapshot as a local backup user? There
used to be a posting for this, but I can't find it anymore. I've been
trying to make sense out of the instructions at:
http://blog.innerewut.de/2005/06/03/follow-up-on-remote-filesystem-snapshots-with-rsnapshot
but still having some permissions issues.

I've got the ssh key set up, and can run the rsync command manually to
back up files from the remote system. But it still complains about
permissions when trying to move files on the local rsnapshot_root
location. So I try to run rsnapshot as sudo, and it does gain access to
all the local files, but won't connect correctly to
backupuser < at > remoteserver - it always prompts for password even though
I've done these things:
- configured ssh key for the backupuser on the remote system
- confirmed in remote server's logs that it is trying and failing to
connect as backupuser, and not as root
- created the rsync-wrapper that calls rsync as sudo (rather than rename
the system's rsync to rsync_real as suggested)

Here's the rsync syntax that rsnapshot is using:

/usr/bin/rsync -aevx --delete --numeric-ids --relative --delete-excluded \
--rsync-path=/usr/bin/rsync-wrapper --rsh=/usr/bin/ssh \
backupuser < at > remoteserver/home/ /.snapshots/hourly.0/servername/

Error messages:
-----------------------------------------------------------
running as the backupuser:
ERROR: Warning! Recursion error in
native_cp_al("/.snapshots/hourly.0/localhost/home/...",
"/.snapshots/hourly.1/localhost/home/...")
ERROR: Could not open "/.snapshots/hourly.0/localhost/home/...". Do you
have adequate permissions?
WARNING: /usr/bin/rsnapshot -VV hourly: completed, but with some
warnings

when running as sudo:
Could not lchown() symlink "/.snapshots/hourly.1..."
Prompts for password when it attempts to connect to remote system. Don't
want to have to enter one.
-----------------------------------------------------------
Thanks for any good suggestions on this.

--
Mark Sallee




-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post rsnapshot as local user 
On Thu, Nov 01, 2007 at 04:38:56PM -0600, Mark Sallee wrote:
Is anybody out there backing up rsnapshot as a local backup user?

Are you happy to lose user/group ID information in your backups?
If not, you would need to run rsnapshot as local root (at least
effectively).

So I try to run rsnapshot as sudo, and it does gain access to
all the local files, but won't connect correctly to
backupuser < at > remoteserver - it always prompts for password even though

Maybe the problem is that ssh is looking for the identity file in a
different when you use sudo.

Have you tried something like this?
ssh_args -i /home/backupuser/.ssh/id_dsa

If you like you could also add "-o BatchMode=yes", like this:
ssh_args -i /home/backupuser/.ssh/id_dsa -o BatchMode=yes
to ensure that ssh doesnt ask for a password (it either succeeds
with a public key or fails).

Here's the rsync syntax that rsnapshot is using:

/usr/bin/rsync -aevx --delete --numeric-ids --relative --delete-excluded \
--rsync-path=/usr/bin/rsync-wrapper --rsh=/usr/bin/ssh \
backupuser < at > remoteserver/home/ /.snapshots/hourly.0/servername/

Why do you have "-e" in rsync_short_args? That doesn't look right.

Error messages:

when running as sudo:
Could not lchown() symlink "/.snapshots/hourly.1..."

No immediate thoughts on this one, unless its a hangover from using
backupuser sometimes and sudo other times when you run rsnapshot to
create/update snapshots (a long shot).

Prompts for password when it attempts to connect to remote system. Don't
want to have to enter one.
-----------------------------------------------------------
Thanks for any good suggestions on this.


--
___________________________________________________________________________
David Keegel <djk < at > cybersource.com.au> http://www.cyber.com.au/users/djk/
Cybersource P/L: Linux/Unix Systems Administration Consulting/Contracting

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post rsnapshot as local user 
Hi Mark,


Is anybody out there backing up rsnapshot as a local backup user?
There
used to be a posting for this, but I can't find it anymore. I've been
trying to make sense out of the instructions at:
http://blog.innerewut.de/2005/06/03/follow-up-on-remote-filesystem-
snapshots-with-rsnapshot
but still having some permissions issues.

I've got the ssh key set up, and can run the rsync command manually to
back up files from the remote system. But it still complains about
permissions when trying to move files on the local rsnapshot_root
location.



You are probably backing up folders that do not have the u+rwx
permission. You can either fix the permission on the folder and start
a new backup, or either disable preserving permissions or use the new
Rsync --chmod argument if you intent to run Rsnapshot as non-root.

Please see Debian Bug #290967:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=290967

Regards,


Simon

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
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