Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Backing up VPS
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Backing up VPS

RancidMRancidM Member
edited March 2012 in Tutorials

Hello Again.

So i now have a VPS with Hostignation and very happy i am with it.

Now looking at a method to take a back up once in a while.
Happy to download it and keep it on my nas at home.

my VPS is running CentOS with Kloxo.

any suggestions ?

Cheers
Cid.

Comments

  • rsync and a cronjob is the tipical way to go.

  • InfinityInfinity Member, Host Rep
    edited March 2012

    My pretty raw backup script, it's based on something @dmmcintyre3 wrote, pretty simplistic but works and easy to modify for your needs. It uses http://sourceforge.net/projects/automysqlbackup/.

    #!/bin/bash
    cd /var/backups
    /usr/local/bin/automysqlbackup /etc/automysqlbackup/myserver.conf
    
    rm www_backup.10.tgz
    mv www_backup.9.tgz www_backup.10.tgz
    mv www_backup.8.tgz www_backup.9.tgz
    mv www_backup.7.tgz www_backup.8.tgz
    mv www_backup.6.tgz www_backup.7.tgz
    mv www_backup.5.tgz www_backup.6.tgz
    mv www_backup.4.tgz www_backup.5.tgz
    mv www_backup.3.tgz www_backup.4.tgz
    mv www_backup.2.tgz www_backup.3.tgz
    mv www_backup.1.tgz www_backup.2.tgz
    mv www_backup.0.tgz www_backup.1.tgz
    
    tar -zcvf www_backup.0.tar.gz /var/www
    tar -zcvf `date +"%Y%m%d"`_other.tar.gz /etc/nsd /etc/ssl /etc/cron.hourly /etc/cron.daily /etc/nginx/conf.d
    
    rsync /var/backup/db/daily -avz -e "ssh -p5906" [email protected]:~/backups_[servername]/mysql
    rsync /var/backups -avz -e "ssh -p5906" [email protected]:~/backups_[servername]/
  • If you're backing up to a local Linux box, why not simply rsync from the vps and then build redundancy locally. Less transfer, less i/o on the vps.

  • InfinityInfinity Member, Host Rep

    @sleddog said: build redundancy locally

    I don't have much disk space.

  • I have a Synology unit at home that i understand can act as a Rsync target.
    Maybe a project for tommorow.

  • KuJoeKuJoe Member, Host Rep

    @RancidM said: I have a Synology unit at home that i understand can act as a Rsync target.

    Maybe a project for tommorow.

    Good luck if you're using the GUI to configure rsync, I never got it to work. Your best bet is to do everything CLI for rsync with Synology. I use mine for all of my backups and CLI makes it soooo much easier (1 line of code versus never getting it to work with the GUI).

    Thanked by 1RancidM
  • You could try using rdiff-backup. We have been using it for backups for some time and it has been solid. If you have custom firmware on your NAS(some unlocked one where you have ssh access) you may be able to install rdiff-backup there and have it perform backups automatically.

  • There's a program called rdiff-backup that uses rsync but also does automatic versioning.

  • @Infinity said: My pretty raw backup script, it's based on something @dmmcintyre3 wrote, pretty simplistic but works and easy to modify for your needs. It uses http://sourceforge.net/projects/automysqlbackup/.

    automysqlbackup already does archived backups... did you reinvent the wheel here or am I missing something?

  • InfinityInfinity Member, Host Rep
    edited March 2012

    @Aldryic said: automysqlbackup already does archived backups... did you reinvent the wheel here or am I missing something?

    I know, I didn't archive the stuff again, I just sent the archives via rsync to the other server, does it have that as a built in feature?

  • RancidMRancidM Member
    edited March 2012

    [@KuJoe said]

    Good luck if you're using the GUI to configure rsync, I never got it to work. Your best bet is to do everything CLI for rsync with Synology. I use mine for all of my backups and CLI makes it soooo much easier (1 line of code versus never getting it to work with the GUI).

    HI Kujoe.
    Any advice to share on the topic.
    i have SSH into my Snyo, but im not a linux geek by a long long shot indeed.

  • Just been digging and as im running kloxo, it has a built in backup to FTP.
    I can eaisly have it back on to my Snyo over FTP.

    my user standing is that this a full back up of the whole Kloxo enviroment.
    As im not doing anything outside of Kloxo this should be suffice for me ?

Sign In or Register to comment.