FTP Backups

From SolusVM

Jump to: navigation, search
Important PLEASE READ - This backup method has been discontinued, please goto the following link for it's replacement. Automated_Backups


Contents

Automated FTP backup of OpenVZ containers

Our automated ftp backup system allows you to backup all the containers on a node. FTP backups are configured via the ftpconfig.php file located in /usr/local/solusvm/data on each of your nodes.


Extra Packages

You may need some extra packages to run the ftp backup system. As root in SSH on the server you require backing up run:

cd /tmp
wget http://files.soluslabs.com/solusvm/install/vzdump-1.1-1.noarch.rpm
wget http://files.soluslabs.com/solusvm/install/cstream-2.7.4-3.el5.rf.i386.rpm
wget http://files.soluslabs.com/solusvm/install/perl-LockFile-Simple-0.206-1.el5.rf.noarch.rpm

yum install -y exim
rpm -ihv perl-LockFile-Simple-0.206-1.el5.rf.noarch.rpm
rpm -ihv cstream-2.7.4-3.el5.rf.i386.rpm
rpm -ihv vzdump-1.1-1.noarch.rpm

Configuration

Example ftpconfig.php

<?php
 
 $ftpconfig['server']            = "1.1.1.1"  // ftp server ip or hostname
 
 $ftpconfig['username']          = "ftpuser"   // ftp server username
 
 $ftpconfig['password']          = "mypassword"  // ftp server password
 
 $ftpconfig['port']              = "21"   // Port of the ftp server
 
 $ftpconfig['passive']           = FALSE;   // Set passive mode for ftp
 
 $ftpconfig['dir']               = "/"   // The directory on the ftp server where you want the files to be stored
 
 $ftpconfig['email']             = "support@youremail.com"   // The emailaddress you want notifications to be sent to 
 
 $ftpconfig['exclude']           = ""  // The CTID's of any containers you want to exclude from the backup. Example: 101,102,107
 
 $ftpconfig['tmpdir']            = "/vz/dump"   // The directory where temp files should created
 
 $ftpconfig['rotation']          = "0"   // 0 = no rotation, 1 = 7 day rotation
 
 $ftpconfig['ionicepriority']    = "4"   // Class data (typically 0-7, lower being higher prio)
 
 $ftpconfig['ioniceclass']       = "2"   //  1: realtime, 2: best-effort, 3: idle
 
 $ftpconfig['nice']              = "19"  //  Nicenesses range from -20 (most favorable scheduling) to 19 (least favorable)
 
?>


Automation via Cronjob

Run the backup daily at midnight:

0 0 * * * /usr/bin/solusvmftpbackup > /dev/null 2>&1

Run the weeklp daily at midnight:

0 0 * * 0 /usr/bin/solusvmftpbackup > /dev/null 2>&1
Personal tools
Installation/Upgrading
Customization