OpenVZ Forum


Home » General » Discussions » Container backup on remote host (How to do it?)
Re: Container backup on remote host [message #42972 is a reply to message #42971] Thu, 23 June 2011 09:17 Go to previous messageGo to previous message
rimote is currently offline  rimote
Messages: 2
Registered: June 2011
Junior Member
you can use backupninja or tons of script available on the net

I would recommend you write a loader, listfile and a backupscript yourself.

Loader is the one you call through cron once a day or so:

#!/bin/bash

source /root/backuplist >> /varlog/backuplog

exit 0

The list /root/backuplist is the file where you echo every VPS in. You can do that with (example VEID 1102):

# echo "/root/backup.sh 1102" >> /root/backuplist

Then the backup.sh file itself:

#!/bin/bash
backupserverip=77.77.77.77

vzctl stop $1
rsync /var/lib/vz/private/$1 backup@${backupserverip}
vzctl start $1

exit 0

You should look at the details of this pseudo script. My system mayb different. I encourage you to fix your problem this way. A good sysadmin has to know how this works.

adding to cron can be done with # crontab -e

good luck
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Breaking Out of Openvz.
Next Topic: Few Questions
Goto Forum:
  


Current Time: Sat Sep 28 06:17:52 GMT 2024

Total time taken to generate the page: 0.04107 seconds