You are not logged in.

#1 2012-05-06 13:20:01

giwrg98
Member
Registered: 2012-04-12
Posts: 81

Which backup to choose?

I just finished setting up my Arch Linux installation and I would like to backup everyting so if something goes wrong, I will not have to configure again my system. I have read the wiki page but I do not know what programm suits my needs the best. I would like to make only one time back up in a storage device, like a cd or a external hard drive. Do you have any recommendations?

Offline

#2 2012-05-06 13:54:40

hadrons123
Member
From: chennai
Registered: 2011-10-07
Posts: 1,249

Re: Which backup to choose?

It depends on how you want to access it again.
CD or external hard drive are very different things.

I would do external hard drive, normally.

i 'm not sure if you went thru this, but this might help.
http://en.wikipedia.org/wiki/Backup


LENOVO Y 580 IVYBRIDGE 660M NVIDIA
Unix is user-friendly. It just isn't promiscuous about which users it's friendly with. - Steven King

Offline

#3 2012-05-06 16:08:53

giwrg98
Member
Registered: 2012-04-12
Posts: 81

Re: Which backup to choose?

Is there a tool to backup in an external hard drive?

Offline

#4 2012-05-06 16:10:19

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,373
Website

Re: Which backup to choose?

There are many.  I'd suggest rsync.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#5 2012-05-06 17:33:29

giwrg98
Member
Registered: 2012-04-12
Posts: 81

Re: Which backup to choose?

So shall I follow the giude here: https://wiki.archlinux.org/index.php/Fu … with_rsync ?
Also, if I just type rsync -av / /media/<external hd> what should I do next to have my system restored?

Offline

#6 2012-05-06 19:14:46

funkypotatoe
Member
Registered: 2012-03-23
Posts: 47

Re: Which backup to choose?

giwrg98 wrote:

Also, if I just type rsync -av / /media/<external hd> what should I do next to have my system restored?

I would say... : "man rsync".

Offline

#7 2012-05-07 10:16:49

giwrg98
Member
Registered: 2012-04-12
Posts: 81

Re: Which backup to choose?

funkypotatoe wrote:
giwrg98 wrote:

Also, if I just type rsync -av / /media/<external hd> what should I do next to have my system restored?

I would say... : "man rsync".

I read the man page but it doesn't say how to restore the backup hmm

Offline

#8 2012-05-07 10:26:33

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: Which backup to choose?

rsync the files back to the original drive, using the proper options to maintain the correct permissions, timestamps, etc.

Offline

#9 2012-05-07 10:28:56

giwrg98
Member
Registered: 2012-04-12
Posts: 81

Re: Which backup to choose?

thisoldman wrote:

rsync the files back to the original drive, using the proper options to maintain the correct permissions, timestamps, etc.

Which are these?

Offline

#10 2012-05-07 10:29:13

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: Which backup to choose?

giwrg98, you can use tar - it saves permissions.
Boot from LiveCD, mount a partition, `cd` into mount point and

tar -cpf my-partition-backup.tar *

Something like this...

One more option is to use https://wiki.archlinux.org/index.php/Partclone .

Last edited by Mr. Alex (2012-05-07 10:30:49)

Offline

#11 2012-05-07 10:42:01

giwrg98
Member
Registered: 2012-04-12
Posts: 81

Re: Which backup to choose?

Mr. Alex wrote:

giwrg98, you can use tar - it saves permissions.
Boot from LiveCD, mount a partition, `cd` into mount point and

tar -cpf my-partition-backup.tar *

Something like this...

One more option is to use https://wiki.archlinux.org/index.php/Partclone .

And what partitions and folders should I mount?

Offline

#12 2012-05-07 10:47:01

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: Which backup to choose?

The ones you want to backup completely.

Offline

#13 2012-05-07 10:48:38

giwrg98
Member
Registered: 2012-04-12
Posts: 81

Re: Which backup to choose?

Mr. Alex wrote:

The ones you want to backup completely.

I want to have my confiquration files and programs backed up. I think there are some Partitions I must not backup because they are generated from the system in start up. Which are these?

Offline

#14 2012-05-07 10:57:40

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: Which backup to choose?

Right, but those are in root dir only when you are running your OS, that's why I told you to boot from LiveCD and mount partitions. /sys and /proc for example are virtual.

I want to have my confiquration files and programs backed up.

How do you want to backup programs? You just install them from repositories.

Configs are what you might wanna backup. Those are in your home dir and some are in /etc. If you want to backup your whole system - just `tar` system partition. Partclone is much easier for this purpose. And you can have another HDD for backups: suppose you have sda1,sda2,sda3 on sda. Then you can make backup files of these three partitions with partclone and save 'em to your other HDD - sdb1.

Last edited by Mr. Alex (2012-05-07 10:58:51)

Offline

#15 2012-05-07 11:05:58

giwrg98
Member
Registered: 2012-04-12
Posts: 81

Re: Which backup to choose?

So should I type "tar -cf backup.tar /etc/ /home/user/" and then replace a fresh installed system's folders with these ones in the archive?

Offline

#16 2012-05-07 11:11:33

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: Which backup to choose?

Kind of... But this may easily mess up things. And you also forgot the "p" option for tar which saves files' permissions (if you don't use "p" here - you will definitely mess all up).

Paste an output of

fdisk -l

here.

Last edited by Mr. Alex (2012-05-07 11:12:58)

Offline

#17 2012-05-07 11:14:08

giwrg98
Member
Registered: 2012-04-12
Posts: 81

Re: Which backup to choose?

It only works when I execute it with sudo:

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63      208844      104391   83  Linux
/dev/sda2          208845      738989      265072+  82  Linux swap / Solaris
/dev/sda3          738990    16113194     7687102+  83  Linux
/dev/sda4        16113195   625137344   304512075   83  Linux

Offline

#18 2012-05-07 11:30:33

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: Which backup to choose?

Let's say your sda4 is for personal data and sda1 contains the system (including /home and /etc) (I have sda1 for system, sda2 for data and sda3 for swap on my PC). And suppose you want to backup your system so if you screw things up - you'll be able to restore working system easily.

Boot from SystemRescueCD,

cd /mnt
mkdir sda1
mkdir sda4
cd sda1
tar -cpf ../sda4/sda1-backup.tar * .*

This will create complete backup of your system partition (sda1) to your data partiton sda4 (the whole partition with system files, programs, /etc configs, /home configs will be presented as one tar file). From this script figure out how to untar it back.

Offline

#19 2012-05-07 19:20:03

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,080
Website

Re: Which backup to choose?

This thread is looking like classic help vampirism. Please make more of an effort to solve your issue with your own research and effort giwrg98.


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB