Editing Backup a running container over the network with ezvzdump
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
== Ezvzdump == | == Ezvzdump == | ||
− | Ezvzdump (not to be confused with | + | Ezvzdump (not to be confused with vzdump) is a shell script that also allows |
you to dump out a running VE container. The key differences are that ezvzdump | you to dump out a running VE container. The key differences are that ezvzdump | ||
allows you to utilize past dumps to speed things up, and that a remote host can | allows you to utilize past dumps to speed things up, and that a remote host can | ||
Line 7: | Line 7: | ||
The dump files that are created are compatible with those that vzdump creates, | The dump files that are created are compatible with those that vzdump creates, | ||
− | so you must still use | + | so you must still use `vzdump --restore` to restore them. |
Dependencies: sendEmail package for emailing of statistics | Dependencies: sendEmail package for emailing of statistics | ||
− | + | I recommend using nice and ionice to run this script so it doesn't bring the host to it's knees. Here is an example from my crontab. It runs this script every night at 3:30 AM and my server is just as responsive as if it wasn't running at all. | |
− | I recommend using | ||
− | |||
<pre> | <pre> | ||
− | + | 30 3 * * * /usr/bin/nice -n 19 /usr/bin/ionice -c3 /usr/local/scripts/ezvzdump | |
− | |||
− | |||
− | |||
− | 30 3 * * * | ||
</pre> | </pre> | ||
Line 26: | Line 20: | ||
2009/7/24 - JBiel - Added support for GZip compression and backup | 2009/7/24 - JBiel - Added support for GZip compression and backup | ||
retention/rotation. Also added support for emailing of statistics. | retention/rotation. Also added support for emailing of statistics. | ||
− | |||
− | |||
== Download == | == Download == | ||
Line 200: | Line 192: | ||
# don't want multiple tar processes running on the remote host simultaneously. | # don't want multiple tar processes running on the remote host simultaneously. | ||
e "Making a g-zip compresssed tar archive on remote host (this process will run in the background on the remote host)." | e "Making a g-zip compresssed tar archive on remote host (this process will run in the background on the remote host)." | ||
− | ssh ${REMOTE_HOST} "tar czf ${REMOTE_DIR}${VEID}.0.tar.gz | + | ssh ${REMOTE_HOST} "tar czf ${REMOTE_DIR}${VEID}.0.tar.gz -C ${REMOTE_DIR}${VEID} ./ 2>/dev/null " & |
fi | fi | ||
Line 210: | Line 202: | ||
cat /tmp/vzbackuptimes | sendEmail -f root@`hostname` -t someuser@example.com -u "`hostname` VZ backup statistics." -s mail.example.com #(put your open relay here) | cat /tmp/vzbackuptimes | sendEmail -f root@`hostname` -t someuser@example.com -u "`hostname` VZ backup statistics." -s mail.example.com #(put your open relay here) | ||
echo | echo | ||
− | + | echo /tmp/vzbackuptimes | |
rm /tmp/vzbackuptimes | rm /tmp/vzbackuptimes | ||
</pre> | </pre> |