Thursday, June 28, 2012

OVH: How to synchronize backup files using FTP backup account?

Alongside with dedicated server or VPS (?) in OVH you are getting FTP Backup Server (for now is 100 GB). For me space is enough to keep two copies of whole system.

There are many ways to do backup, currently I'm using dar to backup PROXMOX host-os (maybe someday I'll post my backuping script). To backup VM's I use lvm2 snapshots in RAM

The thing is How to synchronize backups files with your free OVH FTP Backup Account? Things You will need:

  1. FTP Backup Account - to create one follow http://help.ovh.co.uk/backupftp
  2. lftp - just use your package manager eg. sudo apt-get install lftp
  3. use script (see man lftp page to see what particular options do):
#!/bin/bash
HOST="ftpback*.ovh.net"
USER="***"
PASS="***"
LCD="/backup/"
RCD="/"
echo ftp://$USER:$PASS@$HOST;
lftp -c "set ftp:list-options -a;
open ftp://$USER:$PASS@$HOST;
lcd $LCD;
cd $RCD;
mirror -RL \
       --delete \
       --delete-first \
       --verbose"

No comments:

Post a Comment