Backup / Restore with rsync [message #50839] |
Thu, 14 November 2013 15:16 |
grep
Messages: 34 Registered: November 2013
|
Member |
|
|
Hello,
i have a script to backup all my containers.
rsync -avh --delete --log-file=rsync.log root@1.1.1.1:/vz/private/ /home/backup/1
On the openvz wiki page i was reading now that with rsync there is a need of suspend/resume. But i cant find information why this is so.
Quote:openvz. org/Backup_of_a_running_container_with_vzdump
Use rsync and suspend/resume (minimal downtime)
I tested restoring and it works:
rm -rf /vz/private/100/*
rsync -av backupdir/100 /vz/private/100/
vzctl start 100
Container starts and everything works good.
I saw only one problem:
chown / chmod is correct everywhere, but on /var/www it is www-data:tape instand of www-data:www-data.
Then i checked how the group id should be (on the container + at my rsync backup - on both the value is 33):
drwxr-xr-x 3 33 33 4.0K Jun 21 01:17 www
But after restoring it is:
drwxr-xr-x 3 33 26 4.0K Jun 21 01:17 www
Does somebody know why the groupid is not correct when the backup is restored?
Does somebody know why on rsync backup the container should get suspended?
Thanks a lot!
|
|
|
|
Re: Backup / Restore with rsync [message #50843 is a reply to message #50842] |
Thu, 14 November 2013 22:54 |
grep
Messages: 34 Registered: November 2013
|
Member |
|
|
Hi Pavel,
thanks for you awesome answer. I will try it and give report back. I think it must work ))
I have another answer. I checked out the ezvzdump script and saw that they make:
RSYNC_DEFAULT="rsync -ravH --delete-after --delete-excluded"
Is it a good idea to use the -H option? I am not sure but i think that the OS is using softlinks which is included in -a option.
But i think it doesnt hurt if i use -H to be sure everything is right?
Thanks!
Edit: --numeric-id has fixed it. Thanks so much!
[Updated on: Fri, 15 November 2013 02:27] Report message to a moderator
|
|
|