Howdy, Stranger!

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


Best Backup Method for Linux 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.

Best Backup Method for Linux VPS?

GunterGunter Member
edited January 2015 in General

I'm looking for a straightforward and simple backup solution for a linux VPS that should ideally cover either the whole filesystem, or certain directories. Also, it should include MySQL database updates if possible.

CDP is way too buggy. Servers and Backup Jobs keep deleting themselves.

Comments

  • pbgbenpbgben Member, Host Rep

    What type of visualization?

  • rsync the entire FS.

  • @pbgben said:
    What type of visualization?

    OpenVZ.

    rsync the entire FS.

    Any tutorial on that? I'm not very proficient with rsync.

  • You could use vzdump (assuming you have access to the host node):

    https://openvz.org/Backup_of_a_running_container_with_vzdump

    If you don't then rsync is good solution

  • edited January 2015

    @Gunter said:
    I'm looking for a straightforward and simple backup solution for a linux VPS that should ideally cover either the whole filesyste

    CDP is way too buggy. Servers m, or certain directories. Also, it should include MySQL database updates if possible.and Backup Jobs keep deleting themselves.

    Bacula.

    Side note: If you find Bacula a PITA to manage, install webmin and configure Bacula from there. Use bacula coupled with xtrabackup for mysql backups.

  • I just use tar and gpg. A cron job runs it once a day, with a full backup once a week.

  • SolveDNSSolveDNS Member
    edited January 2015

    Servint provides automatic backups of the entire file system. This is the reason I pay extra for their VPS, peace of mind! They backup your MySQL databases as well.

    EDIT: Sorry, I meant Servint, not sure about backups on DO.

  • pbgbenpbgben Member, Host Rep

    @SolveDNS said:
    DigitalOcean provides automatic backups of the entire file system. This is the reason I pay extra for their VPS, peace of mind! They backup your MySQL databases as well.

    This. If you can find a provider that is able to provide backup as a service then its defiantly worth it. (Make sure to check where the backups are stored and take your own copies off site!)

  • Not sure if this helps but a friend of mine wrote this.

    https://github.com/RoyCurtis/roybackup

  • I use cronjobs to 7zip (pass protected) /var/www/ and a dbdump.sql and then use another VPS to pull it off the servers through SCP (jailed account using SSH keys)

  • I nest OpenVZ containers inside KVM's and backup them whole with one click (well, command) from the KVM "node" level.

  • Nick_ANick_A Member, Top Host, Host Rep

    tarsnap is an option.

  • NickMNXioNickMNXio Member, Host Rep
  • Can just tar -cjvf backup.tar.bz2 foldername containing config files (e.g. nginx), database dumps and websites, then download it daily with a rsync cronjob.

  • bigcatbigcat Member
    edited January 2015

    @Gunter said:

    How to backup everything on Linux server using rsync

    rsync -avz --exclude=/proc <source> <username>@<destination>

    Example,

    rsync -avz --exclude=/proc / [email protected]

    a=archive perm/ownership etc

    v=verbose

    z=compress

    You might want to take special care for database, as rsync is not foolproof. mysqldump should be good.

  • Assuming that your provider doesn't offer backups or you don't have access to the host...

    I'm surprised that only a single person suggested duplicity. Backuping the entire FS with rsync is inefficient in terms of space at very least, in general terms, unless you really have a reason for that.

    Your requirements are low: you just want to backup a bunch of directories and MySQL... you can use AutoMySQLBackup or any other script and call it before duplicity through cron. Duplicity will help you to encrypt your data with e.g. GPG and copy it elsewhere if you want. Also it's an easy way to create incremental backups to save some space. It's also quite easy to use (and free). Give it a shot!

  • @bigcat said: You might want to take special care for database, as rsync is not foolproof. mysqldump should be good.

    Yep. This works well, too. Use similar command to clone/migrate working VM's/containers when I have no node access. You forgot to mention it's a good idea to stop MySQL and a few other services first.

Sign In or Register to comment.