LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Rsync backups (https://www.linuxquestions.org/questions/linux-general-1/rsync-backups-504528/)

gabsik 11-24-2006 12:34 PM

Rsync backups
 
I want to backup my entire system using rsync incremental.To backup my entire system i need root privileges.The remote host where the backup is going to be sent dosn't allow root access.This behavior is because bastille.In sshd.conf i have
Code:

PermitRootLogin forced-commands-only
and in /root/.ssh/authorized_keys
Code:

from="192.168.1.6",command="/usr/local/bin/check_command" ssh-dss
check_command is a script that checks only the rsync command is permitted also without malicious codes.Bastille cancelled root login from /etc/securetty .I added back the ttys but still root login is not allowed where else could i check to allow root ????
Thanks

hob 11-24-2006 06:41 PM

It's generally best to avoid logging in to remote systems as root, and if the remote system just holds the backups you don't need to use root access. Instead, create a dedicated account on the remote system, and have your backup script login with that account.

FWIW, check out rdiff-backup, which builds a convenient backup system on top of rsync and SSH.

matthewg42 11-24-2006 06:47 PM

I think for rsync to preserve owner and group settings for files, the rsync process which is writing the backup files must be executed as root. I use rsync for backups from 3 machines on my local network, but since I'm only backing up my home directories, I decided to use a non-root user on the destination machine and concede that I won't have ownership preserved.

hob 11-24-2006 07:14 PM

Yes, it's best to use a dedicated backup product such as Bacula or Amanda if you want or need full system recovery.

I mainly use rdiff-backup for basic backup of my data, and also chose not to worry about preserving file permissions. On one simple server I used a script that backs up to tar files, with another script to copy the tar files over SSH to another system.


All times are GMT -5. The time now is 10:23 AM.