[gentoo-user] Re: Backups

2007-10-02 Thread Francesco Talamona
> P.s: You are quite correct that xfs is overkill for /boot. However I
> just found it easier to xfs everything (otherwise I'd have to use
> different dump programs depending on what I was backing up etc... ).
> To me this is more important than the fact that it wastes disk space
> a bit (my /boot uses a 128M partition but only gets 93M to actually
> use...and it uses 11M of that! - but disks are quite big now...)

Now everything makes sense. I definitely learned something new.

Ciao
Francesco
-- 
Linux Version 2.6.22-gentoo-r8, Compiled #1 PREEMPT Fri Sep 28 19:41:21 
CEST 2007
One 2.2GHz AMD Athlon 64 Processor, 2GB RAM, 4408.87 Bogomips Total
aemaeth
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Re: Backups

2007-10-02 Thread Mark Kirkwood


Francesco Talamona wrote:


First of all, thanks for sharing.

I used to think xfs was overkill for /boot, but the procedure described 
is quite straightforward.


There are two things I don't understand:

1) why do you delete xfsdump and xfsrestore in /xfsrestore/usr/bin/ just 
extracted to link them to /xfsrestore/sbin


2) the use of df.out isn't clear to me, isn't the dump file name enough 
to know what is in there?
  


1) The symlinks are broken if the package is extracted anywhere other 
than /. I recreated 'em to point where they should (I recall they were 
needed, as some of the ancillary programs break if they are missing or 
broken).


2) The df.out is so you know that (say) usr.0.dmp should be restored to 
a device called (say) /dev/sda6. This will avoid the  need to edit 
restored /etc/fstab (or the need to boot into single user mode and fix 
it). the other point is if you are reusing the same disk setup (assuming 
a software issue is requiring the restore), then checking df.out ensures 
that you recover the system using the same partitions for the 
filesystems as you had pre-restore.


Cheers

Mark

P.s: You are quite correct that xfs is overkill for /boot. However I 
just found it easier to xfs everything (otherwise I'd have to use 
different dump programs depending on what I was backing up etc... ). To 
me this is more important than the fact that it wastes disk space a bit 
(my /boot uses a 128M partition but only gets 93M to actually use...and 
it uses 11M of that! - but disks are quite big now...)

--
[EMAIL PROTECTED] mailing list



[gentoo-user] Re: Backups

2007-10-02 Thread Francesco Talamona
On Tuesday 02 October 2007, Mark Kirkwood wrote:
> $ mkfs.xfs  /dev/sda9
> $ mkdir /xfsrestore
> $ mount /dev/sda9 /xfsrestore
> $ cd /xfsrestore
> $ tar -jxvf  xfsdump-2.2.45.tbz2
> $ cd usr/bin
> $ rm xfsdump xfsrestore
> $ ln -s /xfsrestore/sbin/xfsdump xfsdump
> $ ln -s /xfsrestore/sbin/xfsrestore xfsrestore
> $ export PATH=$PATH:/xfsrestore/sbin:/xfsrestore/usr/bin
>
>
> 5. Restore dumps
>
> Use the contents of df.out to figure out which dump should be
> restored on which device! then temporily mount each filesystem and
> restore it.

First of all, thanks for sharing.

I used to think xfs was overkill for /boot, but the procedure described 
is quite straightforward.

There are two things I don't understand:

1) why do you delete xfsdump and xfsrestore in /xfsrestore/usr/bin/ just 
extracted to link them to /xfsrestore/sbin

2) the use of df.out isn't clear to me, isn't the dump file name enough 
to know what is in there?

Ciao
Francesco
 
-- 
Linux Version 2.6.22-gentoo-r8, Compiled #1 PREEMPT Fri Sep 28 19:41:21 
CEST 2007
One 1GHz AMD Athlon 64 Processor, 2GB RAM, 2003.99 Bogomips Total
aemaeth
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Re: Backups

2007-10-01 Thread Mark Kirkwood

Francesco Talamona wrote:

Yes, please.
I'm not completely new to dump, but I'd like to read about a complete 
dump-backup solution.


Ciao
Francesco

  


Well - its not complete by any stretch of the imagination... but the 
attached (hopefully not striped off by the mailing list software) is a 
very brief discussion of how to do a minimal backup/restore using 
xfsdump. Note that user data is *not* explicitly covered - even tho 
there is no reason it cannot be backed up this way too! In addition it 
does not cover incremental or cumulative backup variations - again no 
reason why this cannot be used, but for a quick and simple *system* 
restore, I find using only full (i.e level 0) dumps  helps avoid admin 
(i.e me making) mistakes.


It's worth noting that the essential logic is simply:
- dump system filesystems
- save xfsrestore binaries as a package

- boot livecd
- install xfsrestore binaries somewhere
- restore dumps

Backup and Restore System
=

This is a quick guide for backing up and restoring xfs dilesystems using 
xfsdump/xfsrestore. It should be relatively simple to apply the ideas for other 
filesystems dump tools (e.g. dumpe2fs for ext2/3).

Backup
--

1. Dump filesystems:

$ cd /data0/backup
$ xfsdump -L boot-0 -M backup1 -l0 -f boot-0.dmp /boot
$ xfsdump -L root-0 -M backup1 -l0 -f .root.0.dmp /
$ xfsdump -L var-0 -M backup1 -l0 -f var-0.dmp /var
$ xfsdump -L usr-0 -M backup1 -l0 -f usr-0.dmp /usr


2. Package dump program

$ quickpkg xfsdump
$ cp /usr/portage/packages/All/xfsdump-2.2.45.tbz2 /data0/backup


3. Record filesystem layout

$ df -m > df.out


4. Save the dumps and packages

Copy to DVD or another machine...


Restore
---

1. Boot from the live cd

We are assuming that we are completely rebuilding the system, or are making
another one (initially) identical to the backed-up one.


2. Partition drives and create empty filesystems etc if required

$ mkfs.xfs /dev/sda1
$ mkswap /dev/sda2
$ mkfs.xfs /dev/sda3
$ mkfs.xfs /dev/sda4
$ mkfs.xfs /dev/sda6


3. Retrieve backup dump and package files from DVD or other machine

May require 2 DVDROMS (or 1 DVDROM and 1 CDROM) - one for live cd, one for 
backup data.


4. Install dump program if it is not already on the live cd

Xfsdump is *not* on the live cd. You need to choose a partition you are not 
using yet and create a filesystem on it, install xfsrestore there and amend the
system path to see it. (or add another tmpfs filesystem).


$ mkfs.xfs  /dev/sda9
$ mkdir /xfsrestore
$ mount /dev/sda9 /xfsrestore
$ cd /xfsrestore
$ tar -jxvf  xfsdump-2.2.45.tbz2
$ cd usr/bin
$ rm xfsdump xfsrestore
$ ln -s /xfsrestore/sbin/xfsdump xfsdump
$ ln -s /xfsrestore/sbin/xfsrestore xfsrestore
$ export PATH=$PATH:/xfsrestore/sbin:/xfsrestore/usr/bin


5. Restore dumps

Use the contents of df.out to figure out which dump should be restored on which 
device! then temporily mount each filesystem and restore it.

$ mount /dev/sda3 /mnt2
$ xfsrestore -f /mnt/cdrom/root.0.dump  /mnt2

Now root is restored we can mount the other empty filesystems and restore them.

$ mount /dev/sda1 /mnt2/boot
$ xfsrestore -f /mnt/cdrom/boot.0.dump  /mnt2/boot
$ mount /dev/sda4 /mnt2/var
$ xfsrestore -f /mnt/cdrom/var.0.dump  /mnt2/var
$ mount /dev/sda6 /mnt2/usr
$ xfsrestore -f /mnt/cdrom/usr.0.dump  /mnt2/usr


6. Chroot, (re)install bootloader and reboot


7. Notes

Obviously you can backup user data this may too (i.e /home), altho other 
methods might be simpler (mind you most dump tools let you do incremental and 
cumulative relatively simply).



Re: [gentoo-user] Re: Backups

2007-10-01 Thread Jason Messerschmitt
On Mon, 1 Oct 2007 18:43:41 +0200
Francesco Talamona <[EMAIL PROTECTED]> wrote:

> On Monday 01 October 2007, Mark Kirkwood wrote:
> > P.s : Actually rebuilding from these saved dumps requires a little
> > thought - I'll post the steps if anyone new to dumps is interested
> > in using this method  for themselves.
> 
> Yes, please.
> I'm not completely new to dump, but I'd like to read about a complete 
> dump-backup solution.
> 
> Ciao
>   Francesco
> 

I've been listening in and I too would be interested in this.

-jason
--
[EMAIL PROTECTED] mailing list



[gentoo-user] Re: Backups

2007-10-01 Thread Francesco Talamona
On Monday 01 October 2007, Mark Kirkwood wrote:
> P.s : Actually rebuilding from these saved dumps requires a little
> thought - I'll post the steps if anyone new to dumps is interested in
> using this method  for themselves.

Yes, please.
I'm not completely new to dump, but I'd like to read about a complete 
dump-backup solution.

Ciao
Francesco

-- 
Linux Version 2.6.22-gentoo-r8, Compiled #1 PREEMPT Fri Sep 28 19:41:21 
CEST 2007
One 1GHz AMD Athlon 64 Processor, 2GB RAM, 2003.99 Bogomips Total
aemaeth
-- 
[EMAIL PROTECTED] mailing list



[gentoo-user] Re: Backups

2005-12-22 Thread reader
Neil Bothwick <[EMAIL PROTECTED]> writes:

> On Thu, 22 Dec 2005 14:26:56 -, Michael Kintzios wrote:
>
>> If you get a minute, a detailed wiki howto would be useful for some of
>> us.  :-)
>
> A minute, where can I get one of those? Is it in portage? :-(

I've heard that package `just works' on kbuntu...:)

-- 
gentoo-user@gentoo.org mailing list



[gentoo-user] Re: Backups

2005-12-16 Thread reader
Paweł Madej <[EMAIL PROTECTED]> writes:

> Allan Spagnol Comar wrote:
>> Thanks all for the answers until now;
>> What i am looking for is to backup 3 servers, and a critical issue
>> workstation.
>> 
> I think that you should test Bacula. that is very scalable app to
> backup from different sources to different media.
>
> http://www.bacula.org

Retoration though is slower than the second coming ...

-- 
gentoo-user@gentoo.org mailing list



[gentoo-user] Re: Backups

2005-12-15 Thread James
Allan Spagnol Comar  gmail.com> writes:

> Some one knows where I can find some good 
> material about backuping linux boxes ?

'emerge -pv amanda'

http://www.amanda.org

Brought to you by the good folks in College Park, the same folks
that use to run the Internet (MAE-EAST) the right waythat
is until the politician and lawyers got involved

James



-- 
gentoo-user@gentoo.org mailing list



[gentoo-user] Re: Backups

2005-12-15 Thread reader
Allan Spagnol Comar <[EMAIL PROTECTED]> writes:

> Good day Gentoo List !!!

A major tool for that is rsync and rsnapshot.

For general theory about it maybe a google search like:

 linux backup strategy

Well pull up a bunch of likely stuff

-- 
gentoo-user@gentoo.org mailing list