Editing Ploop/Backup
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: | ||
[[File:Ploop-backup.png|300px|right|thumb|How backup via snapshot is done]] | [[File:Ploop-backup.png|300px|right|thumb|How backup via snapshot is done]] | ||
− | This article explains how to do consistent backups for [[ploop]] containers, using ploop snapshot feature. | + | This article explains how to do consistent file-based backups for [[ploop]] containers, using ploop snapshot feature. |
== Backup types == | == Backup types == | ||
Line 29: | Line 29: | ||
|- | |- | ||
|| Compatible with pre-ploop backups | || Compatible with pre-ploop backups | ||
− | | {{ | + | | {{No}} || {{Yes}} |
|- | |- | ||
|| Restore individual files | || Restore individual files | ||
Line 42: | Line 42: | ||
# Known snapshot ID | # Known snapshot ID | ||
ID=$(uuidgen) | ID=$(uuidgen) | ||
− | VE_PRIVATE=$( | + | VE_PRIVATE=$(VEID=$CTID; source /etc/vz/vz.conf; source /etc/vz/conf/$CTID.conf; echo $VE_PRIVATE) |
# Take a snapshot without suspending a CT and saving its config | # Take a snapshot without suspending a CT and saving its config | ||
Line 53: | Line 53: | ||
# Delete (merge) the snapshot | # Delete (merge) the snapshot | ||
vzctl snapshot-delete $CTID --id $ID | vzctl snapshot-delete $CTID --id $ID | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</source> | </source> | ||
Line 116: | Line 75: | ||
# Perform a backup using your favorite backup tool | # Perform a backup using your favorite backup tool | ||
# (tar is just an example) | # (tar is just an example) | ||
− | tar cf | + | tar cf backup.tar.xz $MNTDIR |
− | |||
− | |||
− | |||
− | |||
# Unmount the snapshot | # Unmount the snapshot | ||
Line 131: | Line 86: | ||
== See also == | == See also == | ||
− | |||
* [[Man/vzctl.8#Snapshotting|vzctl(8), section Snapshotting]]. | * [[Man/vzctl.8#Snapshotting|vzctl(8), section Snapshotting]]. | ||
− | [[Category: | + | [[Category:ploop]] |
− | [[Category: HOWTO]] | + | [[Category:HOWTO]] |