Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: smiit on January 26, 2007, 10:36:36 PM
-
Hello all. I've been trying to implement an rsync over ssh backup script written by silasp from this thread:
http://forums.contribs.org/index.php?topic=31246.0
I can ssh from the backup server to the main server using key pairs with no errors.
However, any test run of rsyncing a directory from the main server (6.0.1) to the backup server (7.1) gives this error:
[root@backupserver ~]# rsync -aqH -e ssh root@mainserver:/etc/test1/test2/ /backups/daily/etc/test1/test2/
receiving file list ... done
rsync: mkdir "/backups/daily/test1/test2" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at main.c(529) [receiver=2.6.9]
It doesn't appear to be inadequate permission to create directorys on the backupserver since it all runs as root.
Both servers are local for testing before moving the backupserver offsite.
I feel like the answer is right under my nose but I'm scratching my head.
Thanks for any help.
-
you just need the first time you use rsync do via ssh:
mkdir -p /backups/daily/etc/test1/test2/
to create the backup dir, if the destination directory for backup does not exist rsyn can create it but not recursively.
-
you just need the first time you use rsync do via ssh:
mkdir -p /backups/daily/etc/test1/test2/
to create the backup dir, if the destination directory for backup does not exist rsyn can create it but not recursively.
Thanks - that did the trick for this single example but ...
What happens if I'm trying to keep a fileserver in sync where directorys and paths are constantly being created, deleted, renamed, etc.?
In silasp's script, he specifies, among others, the entire /home/e-smith/ directory - I assumed all of the recursive directories would get created ahead of time automatically? But I'm only getting errors like in my original post.
Thanks again
-
In silasp's script, he specifies, among others, the entire /home/e-smith/ directory - I assumed all of the recursive directories would get created ahead of time automatically? But I'm only getting errors like in my original post.
Thanks again
I have a backup running over ssh, it creates the directories under the main directory with no problem:
rsync -avz -e ssh --delete --update --stats root@domainname.xxx:/home/e-smith/files/ezmlm/ /ibays/bjarne_bu/files/ezmlm/
So everything below ezmlm gets created.
Per
-
exact , rsync has no problem to do his job inside his root backup directory, but is unable to create it recursively it if it doesn't exist and his parent directory doesn't exist.
so now you create it rsync will deal with all the rest... : his job.
JPP
-
Hi,
the only point you missed was rsync manual, I guess the command you expect to run was :# rsync -aqH -e ssh root@mainserver:/etc/test1/test2 /backups/daily
and not the one you typed ;) if you want "/backups/daily" to be the "root" of your backup files.
Rsync will manage to update recursively your directory tree according to what is on your source, but you also have to consider what you want to happen with files you are deleting on the source ...
G.
-
:D
Thanks to everyone who read and helped out. I also received help from the script's author, Silas and yes, it was just a matter of creating the parent directories beforehand.
I had been testing it with small directories before tackling the big /e-smith/home batch of files and wasn't doing mkdir -p for the main directories.
Silas' script appears to be a great way to set up another level of redundant, secure off-site backups.
SME - a great product and, more importantly, great people.
Cheers :pint: