jw schultz wrote:
On Mon, Dec 22, 2003 at 09:11:26PM +0100, Sayan wrote:

I am currently setting up a backup script for the /home directory of a server. I send all the files on a remote machine through LAN connection using rsync to optimize bandwidth usage.

The script is run as root on the server by a cron job but rsync connects to the remote machine as a normal user via an ssh key certificate. This leads to many "permission denied" errors, as the server side can read files (as root), but cannot create them on the receiving side.

rsync -azSHe ssh --delete --numeric-ids /home [EMAIL PROTECTED]:/mnt/backup/

Is there an option to ignore only such errors? I have read the man page over and over but i could not find anything to suit my needs.

Why ignore the errors? They are meaningfull unless you don't really care about whether the backups are any good.

I don't care if the backups of the users' homes are not perfect. Running as root on both sides is not an option, so there has to be limits anyway. Config files and logs are much more important, and backing up of the homes is bonus.

As this command is run on a daily basis by a cron job, the same errors get reported every day. That's why i am looking for a way to suppress these particular error messages. (which i find perfectly normal btw)

If you insist on doing it this way go to the backup server
and chown the relevant file set to the account used.
Then review your rsync arguments and eliminate any that
are in conflict with running was a normal user:
        -a, -o, --numeric-ids, and probably -g

That didn't solve the problem when i tested it some time ago. One failure example is trying to send files that cannot be written :

Server side :
dr--r--r--  my_directory
dr--r--r--  my_directory\sample_file

The rsync command tries to send sample_file to the backup server, which cannot write it because it was not able to recurse into my_directory. Removing the -p switch and removing the backup file did not succeed, and rsync continued to preserve the perms even without the switch. I am running rsync 2.5.5 on debian woody/stable.

i have considered stripping the command down to the barest options (recursive compress and ssh) but the errors still get reported.

--
Sayan
--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to