Monday, March 10, 2008

How do I automate backup operations in Virtuozzo?

How do I automate backup operations in Virtuozzo?
VPS backups can be created using vzbackup utility. It should be run on the backup node. You can restore any backup using vzrestore utility.To configure vzbackup you should do the following:
1. Check global vzbackup configuration file /etc/vzbackup.conf file on the backup node for backup parameters (pay attention to $BACKUP_DIR parameter).
If you are going to make backups using cronjob, set the following parameters:
# Backup directory - where the backups will be stored, e.g
BACKUP_DIR="/vz/backups"
# backup type. Supported types are "full", "initial incremental" and
# "incremental". Default is incremental. If it is impossible to do
# "incremental" then "initial incremental" will be done.
BACKUP_TYPE="i"
# Backup cron mode
CRON_BACKUP="yes"
# List of nodes to backup.
BACKUP_NODES=""
# e-mails to send notifications on backup
BACKUP_NOTIFY_EMAIL=root@myserver.com
2. Create directory
# mkdir /vz/backups
3. Add the following command to the crontab on the backup node:
# vzbackup -i -p -a
4. Make sure root user of the backup node is able to access all hardware nodes without a password (propagate DSA public keys).
How do I create VPS with guaranteed amount of RAM (256M, 512M, etc.)?
Virtuozzo is shipped with sample configuration files which allow to allocate 256, 512, 1024, or 2048 MB of memory for a VPS. These samples can be found in /etc/sysconfig/vz-scripts/ directory on the hardware node (ve-vps.256MB.conf-sample, ve-vps.512MB.conf-sample, ve-vps.1024MB.conf-sample, ve-vps.2048MB.conf-sample).
To create VPS #101 using one of these configuration files, use
# vzctl create 101 --config vps.512MB --pkgset fedora-core-2
To apply some configuration sample to already created VPS, use --applyconfig option of vzctl utility.The same operation can be done using Virtuozzo Management Console or Virtuozzo Control Center.

No comments: