Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have bought an Ubuntu server and I'm going to install several websites on it.

I was wondering how to perform backups of the websites.. stored in different folders in the /var/www folder.

For example, I could copy/paste the folders using a ftp client, but I was wondering what's the professional way to backup the data. Should I do it from unix and not ftp ?

Should I run a script ? Should the backup be automatic ?


share|improve this question

migrated from Sep 22 '10 at 12:15

This question came from our site for computer enthusiasts and power users.

up vote 2 down vote accepted

It really depends on what you want to do and what your machine is allowed to do.

I own a virtual server running Debian Lenny. I use backup2l which uses a good mix of differential, incremental and few full backups to save space. Because i'm not allowed to mount external filesystems to store my backups on, i let backup2l store its files on the vserver's drives. A post-backup-hook tells backup2l to use rsync (GREAT tool!) to sync my local backup archive with a remote one on a server at home.

Good Alternatives are:

  • Custom script that uses rsync (that way you'll only have one Snapshot)
  • rsnapshot (uses hardlinks to create snapshots of every state you have backed up available instantly. It's a bit like Apple's Time Machine - but AFAIK rsnapshot was there first ;) )
  • Custom script that uses tar (to create archives of each FULL snapshot)
  • One of the "enterprise ready" backup tools like bacula, Amanda, etc.
  • Searching google for one of the numerous other solutions (see here, here or here)

[edit] You should always send your data through an SSH tunnel, if you are storing your backups on another server (which i recommend!).

share|improve this answer
are "partitions" a backup solution ? In other words, are they useful if data are erased ? Or they cannot be compared to using another server ? could you give me some info about it ? thanks! – Patrick Sep 22 '10 at 11:54
What do you mean by "partitions"? Partitions like "partitions on a disk"? Then: no. Depending on how valuable the data is you REALLY should make a backup to another machine. Or at least another disk. – lajuette Sep 22 '10 at 12:03

While it may be old school, a simple combination of tar and scp may be all you need. Whether it's scripted and / or scheduled depends on you. It's not difficult to do either. A single command can pre authorize scp to work without requiring you to enter password every time.

You should not use simple FTP if you're at all worried about security.

share|improve this answer
ahm ok, but I don't get one point, if the content of my server for some reason is erased then I lose also the backups right ? What's are the other solutions ? Either having another server or creating partitions ? – Patrick Sep 22 '10 at 11:27

Also check out rdiff-backup and backuppc

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.