Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-24-2006, 12:34 PM   #1
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 565

Rep: Reputation: 30
Exclamation 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
PermitRootLogin forced-commands-only
and in /root/.ssh/authorized_keys
from="",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 ????
Old 11-24-2006, 06:41 PM   #2
Senior Member
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
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.
Old 11-24-2006, 06:47 PM   #3
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
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.
Old 11-24-2006, 07:14 PM   #4
Senior Member
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
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.


backup, rsync

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rsync Errors during backups shawnbishop Linux - Software 4 05-18-2006 03:26 AM
Rsync backups gabsik Linux - Networking 1 03-30-2006 10:31 AM
rsync and cp -al for staggered backups babyphil Linux - Software 2 06-14-2005 12:24 AM
Backups with rdiff - how different from rsync? Donboy Linux - Software 1 07-30-2004 10:54 PM
Rsync for incremental backups? Phaethar Linux - Software 3 12-04-2003 01:27 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:45 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration