1

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 ?

thanks

3 Answers 3

2

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!).

2
  • 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!
    – aneuryzm
    Sep 22, 2010 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, 2010 at 12:03
0

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.

1
  • 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 ?
    – aneuryzm
    Sep 22, 2010 at 11:27
0

Also check out rdiff-backup and backuppc

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .