Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Backup of whole system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Mati
Apprentice
Apprentice


Joined: 02 Sep 2008
Posts: 172

PostPosted: Sat Jun 28, 2014 8:25 pm    Post subject: Backup of whole system Reply with quote

Hi folks,

what i currently do to backup my whole system is simply using rsync on a mounted external hard drive. For the /dev i usually download the stage3 and extract the /dev when restoring my system.
Is this necessary or could i also simply copy the /dev on the hdd?

How do you proceed to backup your system fully so you can simply shift it from your hdd when its broken?

Thanks for a detailed desription!
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Sat Jun 28, 2014 8:56 pm    Post subject: Reply with quote

Mati ...

/dev is devtmpfs and so a temporary filesystem, its contents are not preseved between reboots. This means that all you need is the mount point (the /dev directory).

For backup you can use rsync's '--exclude' so that those tmpfs/sysfs directories are not copied (again, the mount points are required but these will not be deleted unless '--delete' is provided).

Code:
# rsync -av --exclude=/dev --exclude=/sys --exclude=/proc --exclude=/run / /path/to/backup

best ... khay
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Sat Jun 28, 2014 9:58 pm    Post subject: Reply with quote

There is an excellent wiki article on how to use rsnapshot for automatic backups.

I have been using it quite successfully since my last drive died. In all irony, all that was lost was my backups :lol: .
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Sun Jun 29, 2014 3:33 pm    Post subject: Reply with quote

What I do, is to boot on a live-cd, mount all Gentoo the source partitions, /, /boot, /home, /usr, /var, etc, but not the virtual and tmpfs file systems like /dev, /proc, /run and /sys.

The /dev directory without udev active contain some static devices files that can be usefull at boot time before udev start to manage the directory dynamically. So I let them there.

I mount the target partitions. Than, if the source is /mnt/gentoo and the destination is /mnt/target, I rsync the destination with the source like this
Code:
rsync -avz --delete-after --progress --stats /mnt/gentoo/ /mnt/target/

My backup is always good. Some specific filesystem directories like lost+found at the root of an ext2,3,4 filesystem may have to be recreate or delete at the destination, depending on what filesystems are mounted at the source and destination. Easier is to use the same filesystems at the destination than the source.

The tar command is a good alternative for a backup, even dd or dcfldd can be used. Partimage make a good job too.

The rule I always apply is to backup the system when it's not in use, from another operating system.
_________________
Paul
Back to top
View user's profile Send private message
Goverp
Veteran
Veteran


Joined: 07 Mar 2007
Posts: 1972

PostPosted: Mon Jun 30, 2014 7:35 am    Post subject: Reply with quote

FWIW, I use app-arch/dump to backup my desktop to a 1 Tb USB drive, running it in rc-single mode. It certainly works well when I've needed to restore a single file.

Someday I must test restoring the whole system !
_________________
Greybeard
Back to top
View user's profile Send private message
deefster
Tux's lil' helper
Tux's lil' helper


Joined: 19 Apr 2004
Posts: 77

PostPosted: Tue Jul 01, 2014 8:43 am    Post subject: Reply with quote

The Doctor wrote:
There is an excellent wiki article on how to use rsnapshot for automatic backups.

I have been using it quite successfully since my last drive died. In all irony, all that was lost was my backups :lol: .


+1

I have been doing rsnapshot incremental weekly and monthly backups to my stora NAS device for the last few months, in addition to local LVM logical volume snapshots that I schedule daily. rsnapshot makes use of hard links, and as such is very storage friendly, in that it requires only slightly more than the size of 1 full backup, but can provide the ability to roll back to multiple points in time. One difference with rsnapshot though is that it's purely a 'pull' methodology, unlike native rsync which can push or pull.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum