Ubuntu – How to backup a remote VPS machine

backupbackup-restorationUbuntu

I am considering opting for a VPS solution, with the server running Ubuntu server. I am pretty new to this, and I need to come up with a backup policy for my server data.

Initial data is likely to be about 80Mb, and I expect the data to grow at approximately 5Mb to 10 Mb a day.

Can anyone recommend:

  1. A backup/restore policy (best
    practises for a small startup)
  2. Which tools to use for backup?

Another thing that is not clear to me is – where are the files backed up to normally (in the case of remote servers). If the files are backed up to the same machine (or even to another machine but with the same host), there is potentially, a single point of failure).

How do people normally backup their server data, and is the probability of machine meltdown or the host company server farm "catching fire" so remote as not to be worth worrying about – especially for a small (read one man) startup like me?

Best Answer

A backup/restore policy is something that is specific to an organisation due to differences in the value of the data and perceived risks. That said, given that you're a one-man startup, you would probably want to do something like:

  • Start with daily backups of everything on the server and then only exclude files once you determine they are not needed;
  • Keep all of your code in a revision control system. Git is a decent choice as you could then also store a copy on a free service like github, a copy on your workstation, and a copy on your server;
  • Be sure to create cron jobs to perform database dumps using the database provided utilities.

For the tools, rdiff-backup works fairly well. Of course, don't forget to actually test that you can restore from your backups at least once. It is best to backup the data to another host or some other machine which is always online.

This is a good bare minimum to get you started. In future once you can justify the effort, you can worry about backup job monitoring, backup set size optimisation (date based log files, gzip --rsyncable rolling database dumps, exclude junk), having the backups go to a machine which is in a ready state to start serving, DR plans, higher frequency backups, daily automated restore testing, etc.

Related Topic