View previous topic :: View next topic |
Author |
Message |
slugggerzzz n00b
Joined: 07 Mar 2012 Posts: 65 Location: Manchester, UK
|
Posted: Mon Oct 15, 2012 10:10 pm Post subject: Best ways to backup your Gentoo systems |
|
|
Just basically want some ways people backup there systems ? _________________ Slugggerzzz ... |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
pidsley Tux's lil' helper
Joined: 09 Jun 2012 Posts: 80
|
Posted: Tue Oct 16, 2012 12:10 am Post subject: |
|
|
Jaglover wrote: | I do not back up the system. Just the user files and system conf. |
This is also what I do. I use rsync to back up user files and some important config files, but don't try to back up the system. |
|
Back to top |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Tue Oct 16, 2012 12:32 am Post subject: |
|
|
I just backup my data and kernel .config and make.conf. Those are the 3 things that make my computer mine. _________________ 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 |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10587 Location: Somewhere over Atlanta, Georgia
|
Posted: Tue Oct 16, 2012 12:46 am Post subject: |
|
|
My user files dominate the size of my backups, so a full system backup isn't a big deal. I back up everything. Monthly full plus nightly incrementals automatically to tape. I can reproduce the (nearly) exact state of my major development systems for any given day in the last 2 years. Outside of that window, I recycle tapes, preserving one full backup per year in perpetuity. I use app-backup/flexbackup.
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3267 Location: Canada
|
Posted: Tue Oct 16, 2012 6:14 am Post subject: |
|
|
I use backuppc to backup my desktop, laptop and wife's macbook air. But I backup only /home and /etc |
|
Back to top |
|
|
slugggerzzz n00b
Joined: 07 Mar 2012 Posts: 65 Location: Manchester, UK
|
Posted: Tue Oct 16, 2012 7:40 am Post subject: |
|
|
This is interesting.
I thought more people would backup their systems with some sort of 'bit copy' and create some sort of images. _________________ Slugggerzzz ... |
|
Back to top |
|
|
GFCCAE6xF Apprentice
Joined: 06 Aug 2012 Posts: 295
|
Posted: Tue Oct 16, 2012 9:41 am Post subject: |
|
|
I rsync sda1,3,4 all to a second drive in the machine and also once a week to an external drive.
This includes all of portage, distfiles, you name it.
If I screw up playing around it's very quick to boot up cd, mount and rsync it all back |
|
Back to top |
|
|
b0nafide Apprentice
Joined: 17 Feb 2008 Posts: 171 Location: ~/
|
Posted: Tue Oct 16, 2012 3:15 pm Post subject: |
|
|
rsync +1 |
|
Back to top |
|
|
Goverp Veteran
Joined: 07 Mar 2007 Posts: 1995
|
Posted: Wed Oct 17, 2012 8:56 am Post subject: |
|
|
If you use ext2/3/4, you might like to try app-arch/dump. It's a command-line tool, also suitable for scripting. Seems fine to me, and when I tried a partial restore some time back, it worked well. I backup to a USB 1TB drive.
There's some old discussion about a note from Linus Torvalds saying he didn't recommend it, but if you read it carefully, IMHO it says he doesn't like running any backup within a running system, because you can't be sure of getting a consistent state if applications are running. I run dump after "rc single", which isn't quite as good as rebooting to a different OS and mounting all your target disks R/O, but I expect is good enough. Some day, probably when I next buy a new PC, I'll try a full system restore. _________________ Greybeard |
|
Back to top |
|
|
LiamOS n00b
Joined: 06 Jun 2012 Posts: 64 Location: Ireland
|
Posted: Wed Oct 17, 2012 6:21 pm Post subject: |
|
|
It was a while ago, but I once did a
tar cfjv system.tar.bz2 / --exclude=/proc --exclude=/dev --exc...
I can't remember if that command is exactly the way, but I basically tarred everything and just extracted it later.
Worked fine. _________________ CFLAGS=" -O999999" |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10587 Location: Somewhere over Atlanta, Georgia
|
Posted: Wed Oct 17, 2012 7:28 pm Post subject: |
|
|
I find I have a little more to say on this topic. The best way to back up your system is with some sort of formal backup program. These support some sort of efficient paradigm such as full plus incremental or differential and always support some sort of logging that helps you recover individual versions of lost files. There are lots of choices—a whole category in the Portage tree, in fact: app-backup. Just a few examples:- For large networks of machines, there's Amanda and Bacula.
- For individual or smaller groups of machines there's backuppc.
- Flexbackup is particularly friendly to tape, and I love tape. (Tape's the only cost-effective way to keep a really deep backup history and I find that professionally useful.)
rsync can be used by itself but you don't get the benefit of a history of perhaps multiple versions of your backed up files without a lot of script foo. That said, it's entirely possible to construct a good backup system that implements the traditional backup paradigms out of traditional *nix tools, but why bother? Others have already done this for you.
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
Gentoo64 n00b
Joined: 21 Oct 2011 Posts: 52 Location: ::
|
Posted: Fri Oct 19, 2012 8:24 am Post subject: |
|
|
I use clonezilla it's fast and easy, does my whole drive in ~60 seconds |
|
Back to top |
|
|
xenobyte n00b
Joined: 30 Nov 2011 Posts: 14
|
Posted: Fri Oct 19, 2012 8:34 am Post subject: |
|
|
Gentoo64 wrote: | I use clonezilla it's fast and easy, does my whole drive in ~60 seconds |
Can confirm that. Works really great for me _________________ Ich neige zur Redundanz und manchmal wiederhole ich mich auch |
|
Back to top |
|
|
forrestfunk81 Guru
Joined: 07 Feb 2006 Posts: 565 Location: münchen.de
|
Posted: Fri Oct 19, 2012 1:42 pm Post subject: |
|
|
I'm using rsnapshot. It is based on rsync can do multiple full and/or partial backups with hardlinks, network backups, is easy to setup and scriptable. _________________ # cd /pub/
# more beer |
|
Back to top |
|
|
kimmie Guru
Joined: 08 Sep 2004 Posts: 531 Location: Australia
|
Posted: Sat Oct 20, 2012 1:41 am Post subject: |
|
|
I use xfs for all filesystems, and xfsdump to back-up. It's fast, and I can tailor which directories/files get backed up using the chattr command. |
|
Back to top |
|
|
Hypnos Advocate
Joined: 18 Jul 2002 Posts: 2889 Location: Omnipresent
|
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3267 Location: Canada
|
Posted: Sat Oct 20, 2012 6:40 am Post subject: |
|
|
John R. Graham wrote: | I find I have a little more to say on this topic. The best way to back up your system is with some sort of formal backup program. These support some sort of efficient paradigm such as full plus incremental or differential and always support some sort of logging that helps you recover individual versions of lost files. There are lots of choices—a whole category in the Portage tree, in fact: app-backup. Just a few examples:- For large networks of machines, there's Amanda and Bacula.
- For individual or smaller groups of machines there's backuppc.
- Flexbackup is particularly friendly to tape, and I love tape. (Tape's the only cost-effective way to keep a really deep backup history and I find that professionally useful.)
rsync can be used by itself but you don't get the benefit of a history of perhaps multiple versions of your backed up files without a lot of script foo. That said, it's entirely possible to construct a good backup system that implements the traditional backup paradigms out of traditional *nix tools, but why bother? Others have already done this for you.
- John |
I second that, and add rsnapshot to the list. It is important also to distinguish backup as a snapshot of a system, and backup as a history of revisions to the system (which
is traditionally meant as a proper backup). That is do you think you may need to recover a file deleted week ago, or what was done a year ago ? Or you just need to restore the system into the most recent state if the disk fails ? |
|
Back to top |
|
|
JanErik Guru
Joined: 28 Oct 2002 Posts: 488 Location: Finland
|
Posted: Sat Oct 20, 2012 6:48 am Post subject: |
|
|
I use rdiff-backup and rsync for /home, and periodically make a tarball of /. |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
|
Back to top |
|
|
ppurka Advocate
Joined: 26 Dec 2004 Posts: 3256
|
Posted: Sat Oct 20, 2012 12:06 pm Post subject: |
|
|
There is also the gentoo stage4method. Not sure if anyone uses it nowadays. _________________ emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/ |
|
Back to top |
|
|
user Apprentice
Joined: 08 Feb 2004 Posts: 200
|
Posted: Sat Oct 20, 2012 12:46 pm Post subject: |
|
|
my 2 steps:
1) rdiff-backup with include/exclude pattern to another disk
2) tar-ing with snapshot facility (full per month, snap per day), crypt and upload to several hosting services
losing disk or human error, step 1) recover
losing living home, step 2) recover from full+last snap upload |
|
Back to top |
|
|
kriz Apprentice
Joined: 22 Jan 2003 Posts: 231
|
Posted: Sat Oct 20, 2012 12:48 pm Post subject: |
|
|
Hypnos wrote: | I wrote a simple howto on rsnapshot which you may find useful. |
thx alot 4 this awesome howto.
i've taken the liberty to modify/currect the cron-jobs and monthly-script |
|
Back to top |
|
|
Hypnos Advocate
Joined: 18 Jul 2002 Posts: 2889 Location: Omnipresent
|
Posted: Sat Oct 20, 2012 1:04 pm Post subject: |
|
|
kriz wrote: | thx alot 4 this awesome howto. |
I'm glad to help -- for so many problems people have with Gentoo the easiest solution is "have backups."
Quote: | i've taken the liberty to modify/currect the cron-jobs and monthly-script |
Thanks for correcting the cron jobs -- they're correct on my machine, but I didn't copy and paste them properly on the howto!
As for the monthly config file, it's not necessary to exclude /dev, /proc and /sys if the "one_fs" flag is enabled. _________________ Personal overlay | Simple backup scheme |
|
Back to top |
|
|
kriz Apprentice
Joined: 22 Jan 2003 Posts: 231
|
Posted: Sat Oct 20, 2012 1:21 pm Post subject: |
|
|
Quote: | As for the monthly config file, it's not necessary to exclude /dev, /proc and /sys if the "one_fs" flag is enabled. |
that explain a lot
have googled around and no, i haven't finish the hole entry
Quote: | Q: Using rsnapshot 1.1.6, when I specify the root filesystem as a backup point, rsnapshot backs up each top level directory seperately. If I'm using one_fs, this makes it impossible to exclude things like the /proc filesystem. |
Quote: | This has been fixed in rsnapshot 1.2.0. You are encouraged to upgrade. Make sure to read the upgrade guide in the INSTALL file, included with the program. If you don't want to, or can't upgrade, read on for a workaround. |
_________________ There is nothing in the desert... and no man needs nothing. |
|
Back to top |
|
|
|