Backupscript for for OpenVZ containers using Ploop storage.
Find a file
2014-10-09 19:19:09 +02:00
LICENSE add license, update readme 2014-10-09 17:14:22 +02:00
README.md add --suspend parameter 2014-10-09 17:52:49 +02:00
vzpbackup.sh allow only valid integers for --keep-count 2014-10-09 19:19:09 +02:00

vzpbackup

Backupscript for for OpenVZ containers using Ploop storage.

The backupscript was initially based on the Image-based backup section of openvz.org/Ploop/Backup

Requirements

  • OpenVZ containers using Ploop for storage
  • and a few commandline tools (bash, cut, date, expr, rsync, ssh, touch, uuidgen)

BACKUP: vzpbackup.sh

Commandline parameters

--destination=<backup destination>

Allows to specifiy an rsync-compatible backup destination.
Default is /vz/backup

--keep-count=<keep count>

Allows to specify how many fullbackups including incremental
backups based on them are held on stock
Default is 0

--suspend=<yes|no>

Allows to specify whether a container should be suspended during
snapshot creation or not. If yes is given, the containers memory
is included in the snapshot.
Default is no

Cronjob examples

Fullbackup every 1st of month and incremental backup every day

0 3 1 * * sh /vz/vzpbackup/vzpbackup.sh --full
5 3 * * * sh /vz/backup.sh --inc

Fullbackup every 1st of week and incremental backup every day

0 3 * * 1 sh /vz/backup.sh --full
5 3 * * * sh /vz/backup.sh --inc

RESTORE: vzprestore.sh (coming in the next months)

AUTHOR

Philipp 'TamCore' Born <philipp {at} tamcore {dot} eu>

License

GNU GENERAL PUBLIC LICENSE v2