You are not logged in.

#1 2010-11-13 01:07:42

655321
Member
From: Costa Rica
Registered: 2009-12-08
Posts: 412
Website

how do I make a complete backup of my system?

hi all,

everytime I try to do a full backup using any tool I get some persmission denied errors, even using sudo. What I want to have is a full backup of my arch laptop so that when I mess it up or something like that, I can recover the ENTIRE system, not just the home folder or certain directories.

What is the best tool for doing this?

I have access to a server at work with a lot of storage space (1 TB) so the best way would something remote, I have tried rsync but either I don't know how to use it or doesn't work to do full systems backup (only folders).

Also, which folders should I exclude? I know I have to exclude /proc and /tmp, but some people also say to exclude /dev and /var/log so I am a little confused.

Thanks for the help!


Linux user #498977
With microsoft you get windows and gates, with linux you get the whole house!
My Blog about ArchLinux and other stuff

Offline

#2 2010-11-13 01:30:38

Ben9250
Member
From: Bath - England
Registered: 2010-06-10
Posts: 208
Website

Re: how do I make a complete backup of my system?

I have used Larch to create a boo-table image of my system and put it on disk. I would read around that. It's basically a build system, you make a directory on your machine and build the framework for another basic Arch system and define what extra packages you want and some of the repository settings etc. Then you create that install and make an overlay, which is any files you want, like your home folder on your system, as well as files from /etc/ like rc.conf, to make sure your system is not only downloaded the packages, but also configured to use everything right, like in the daemons array, or group and sudo settings and such. Then this is turned into and .iso which can be burned to CD or DVD, and then booted live, and even installed, at a later date. As well as building a system in this way, you can have it work on your current active system.

My only criticism of the system is that it takes up quite a bit of memory to copy files over to the overlay and basically create another Arch install inside a directory, which then gets used to generate the .iso and put on a disk. So I keep deleting the overlays and duplicated files to free up memory again. But if you have plenty of space, just leave it and it's faster in the future.

Most of the scripts are command line, that do all this, and it can take a bit of reading to understand how this process of building a live system works and it's a bit heavy at first, but there is also a GUI available with tabs and such to guide you through the process.
I use it all the time and think it's brilliant.

Cheers,
Ben.

[EDIT] If you had access to your server you might be able build the Arch System Directory to be "Larch-ifyed" (which you would make as close as possible to your running system) on that, and then generate the .iso and hold it there too, as well as on disk, so you could have remote access to the backup .iso from numerous locations.

Last edited by Ben9250 (2010-11-13 01:35:31)


"In England we have come to rely upon a comfortable time-lag of fifty years or a century intervening between the perception that something ought to be done and a serious attempt to do it."
  - H. G. Wells

Offline

#3 2010-11-13 02:01:02

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: how do I make a complete backup of my system?

If you really want full backups, clone the drive with dd and backup the image.

However, that doesn't get you anything that you won't get by backing up /etc, /home, /boot/grub/menu.lst and the output of pacman -Qe. Doing massive backups of all the stuff pacman can be told to automatically install from a list of explicitly installed packages is a waste.

Whatever you decide to do, automate it with a cronjob so that you don't forget to backup.

You'll likely want incremental/versioned (and maybe remote) backups, so look into duplicity (it's in [community]).

If you don't want to use duplicity, rsync'ing to a file in dropbox would work too since it has (basic) revision control. Make sure to put it in a tar file though, because dropbox will lose the file permissions.

Last edited by thestinger (2010-11-13 02:03:51)

Offline

#4 2010-11-13 02:21:43

ozar
Member
From: USA
Registered: 2005-02-18
Posts: 1,686

Re: how do I make a complete backup of my system?

Take a look at FSArchiver:

http://www.fsarchiver.org/Main_Page

It's been working well for me.

I usually run it from a liveCD such as Parted Magic or SystemRescueCD.


oz

Offline

#5 2010-11-13 04:40:51

655321
Member
From: Costa Rica
Registered: 2009-12-08
Posts: 412
Website

Re: how do I make a complete backup of my system?

Really, really great tips guys! @ben: that really looks cool it was what i was looking for big_smile however, thestinger approach seems quite good also, I find this approach specially good for backing up the server at work, currently what I do is tar the whole drive to an external hard drive and then remove the oldest backup manually. Of course I will need to use apt-get go get the list of packages, but the principle its pretty much the same.

The server I have access to at work its an Ubuntu one, so I dont think it can be "larchified"

At the moment im thinking I could do the larch iso for a first and one time backup of all my settings and then do what "thestinger" suggested on a regular basis.


Linux user #498977
With microsoft you get windows and gates, with linux you get the whole house!
My Blog about ArchLinux and other stuff

Offline

#6 2010-11-13 08:01:42

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,789

Re: how do I make a complete backup of my system?

thestinger wrote:

If you really want full backups, clone the drive with dd and backup the image.
...

If you clone the drive, it should be cloned while it is not mounted or, at least, not mounted for write -- otherwise it change underneath you while cloning it.  This holds true for tar as well.

As always -- When using dd (or tar) and your destination is a device node, be very, very, very careful.  If you specify the wrong target, your data are history.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2010-11-13 08:50:40

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: how do I make a complete backup of my system?

I couldn't _quite_ find a backup system which worked just as I wanted it, so I put together a script which ties in a bunch of things including incremental tar archives, rsync, lvm snapshots, checksums, package lists, cron, gpg, nfs and sendmail.  Unfortunately I've needed to use these backups before, but at least I know they work.

Offline

#8 2010-11-13 21:28:42

655321
Member
From: Costa Rica
Registered: 2009-12-08
Posts: 412
Website

Re: how do I make a complete backup of my system?

I forgot one thing, some time ago I used clonezilla to make the backups of everything, but then I found out that it didn´t support software RAID, will any of those tools support it?


Linux user #498977
With microsoft you get windows and gates, with linux you get the whole house!
My Blog about ArchLinux and other stuff

Offline

#9 2010-11-13 21:37:16

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: how do I make a complete backup of my system?

If you're using rsync or duplicity, software raid doesn't matter because they are just backing up files, not partitions/drives.

What raid level is it? With raid1 it wouldn't matter, but if each drive is different, then drive cloning might not be such a good idea.

Last edited by thestinger (2010-11-13 21:37:46)

Offline

#10 2010-11-14 01:41:46

655321
Member
From: Costa Rica
Registered: 2009-12-08
Posts: 412
Website

Re: how do I make a complete backup of my system?

I have a RAID 0


Linux user #498977
With microsoft you get windows and gates, with linux you get the whole house!
My Blog about ArchLinux and other stuff

Offline

Board footer

Powered by FluxBB