View previous topic :: View next topic |
Author |
Message |
Mati Apprentice
Joined: 02 Sep 2008 Posts: 172
|
Posted: Sat Jun 28, 2014 8:25 pm Post subject: Backup of whole system |
|
|
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 |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sat Jun 28, 2014 8:56 pm Post subject: |
|
|
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 |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Sat Jun 28, 2014 9:58 pm Post subject: |
|
|
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 . _________________ 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 |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Sun Jun 29, 2014 3:33 pm Post subject: |
|
|
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 |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2014
|
Posted: Mon Jun 30, 2014 7:35 am Post subject: |
|
|
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 |
|
|
deefster Tux's lil' helper
Joined: 19 Apr 2004 Posts: 77
|
Posted: Tue Jul 01, 2014 8:43 am Post subject: |
|
|
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 |
|
|
|