How to make an easy full system backup?

hy!

some time a go i made a dd image of my fedora 8 linode partition and downloaded it to my desktop pc. besides that the image was huge it didnt contain partition data and i was unable to mount it. because i only have ntfs partitions on my desktop i couldn repair it with knoppix…

so now i think of just copying important dirs onto my desktop on a regular basis using scp.

which directories are not senseful to backup, because they dont contain any user-application related settings or directories (/mnt, /dev) ?

my goal is to have a backup that i can restore after a new install of fedora and everything is up and running again. after my last failure, when i accidentaly deleted /bin i could recover by copying the bin dir from another fedora partition..

thx!

7 Replies

I typically back up three directories every night, via rsync:

  • /etc

  • /home

  • /usr/local

I've got a nightly cron job that dumps and gzips MySQL databases into a directory under /home, so I get those as well, and also generates a list of packages installed via the package manager so I've always got an up-to-date list along with my backup.

If I ever need to restore a system, I can start with the base OS, add the packages from the list, and then copy the data and configurations over, and I'll back up and running.

Do you have another linux PC somewhere from which you can perform backups? If so, check out either rsnapshot or rdiff-backup. Either of those will let you do incremental backups of your data over ssh. They're both really easy to set up, and they can provide whatever level of backup granularity you want, down to hourly backups if you desire. I've been using rsnapshot for about 4 years on my linode, and it's worked great.

Another option is outlined in this post. It involves using duplicity on your linode to generate encrypted backup files and then sending them off to Amazon's S3 for storage. I'm in the midst of switching over to this backup method right now actually.

Hope that helps…

@kwilson:

I typically back up three directories every night, via rsync:

  • /etc

  • /home

  • /usr/local

I've got a nightly cron job that dumps and gzips MySQL databases into a directory under /home, so I get those as well, and also generates a list of packages installed via the package manager so I've always got an up-to-date list along with my backup.

If I ever need to restore a system, I can start with the base OS, add the packages from the list, and then copy the data and configurations over, and I'll back up and running.

Hi kwilson. is your way of taking the backup

also keeping your modifications ?

I mean apache installed modules, mysql configurations and php as well?

on most distrobutions you only need to keep your config because everything else is binaryies that you downloaded via apt/yum. so in most cases yes, you only need /etc for your config.

if your going compiling your own packages from source or elsewhere, then you might need to alter your backup stragegy. Backups typically arent a "1 size fits all" system. You need to tailor it to your needs.

I personally back up

  • /etc

  • /var/log

  • /root

  • /var/lib/mysql

  • /home/nf

  • /home/hosting

  • /var/cache/mylvmbackup/backup

I use Amanda at home to backup my workstation, mythtv box, and server, so I added my VPS to the lineup.

A simple rsync shell script will suit most. I run mine on a schedule from my kid's Windows XP machine (which has Cygwin installed).

Here's my script, in case it's of any use. Requires bash, rsync, coreutils, and (optionally) a mailer - i.e. mailx on *nix, email for Cygwin.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct