Re: [gentoo-user] simple backups

2005-02-04 Thread Andreas Vinsander
Nick Smith wrote:
well what is the difference between rsync and rdiff-backup if the latter
is based on rsync? was there something added?
Yep, it handles incremental backups and allows you to restore backups 
from a certain date, more like a real backup system than plain rsync.

More info at:
http://www.nongnu.org/rdiff-backup
/Andreas
--
gentoo-user@gentoo.org mailing list


Re: [gentoo-user] simple backups

2005-02-04 Thread Maik Musall
Just a note for all users in Germany on this topic: Charly Kühnasts
sysadmin article in the current german Linux-Magazin is about
rsnapshot.

Another tool to mention is unison, which serves me well since years,
also combining rsync and ssh.

Regards
-- 
Maik Musall [EMAIL PROTECTED]
GPG public key 0x856861EB (keyserver: wwwkeys.de.pgp.net)


pgpYG5mw4iv1U.pgp
Description: PGP signature


Re: [gentoo-user] simple backups

2005-02-04 Thread Mike Noble
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Nick Smith wrote:
| i read up on the man page of rsync and got that this command will backup
| my server to another external drive i have:
|
| mail root # rsync -avz / /mnt/backup/
|
If you are looking for a way to make backups and to have incremental
backups you should look at dump and restore.
You have the ability to search and restore individual files from the
backups.
A simple command to make a full backup of your systems / would be:
dump 0uf /mnt/backup/ epoch-`date +%F` /dev/hda3
This will produce a file called: epoch-2005-02-04
It will contain everything on the partition /dev/hda3
To create an incremental of everything has changed since the
epoch you would use:
dump 9uf /mnt/backup/ inc-`date +%F` /dev/hda3
To restore a file in interactive mode you would use:
restore -if /mnt/backup/epoch-2005-02-04  or inc-2005-02-04
For more information on dump and restore please refer to your
friendly man pages.
Mike
- --
Mike Noble
Email: [EMAIL PROTECTED]
Key ID: 0xFFDFC13B
Key fingerprint: 8204 1297 B9AD 0CED 2FCE  1FB0 9491 5824 FFDF C13B
Keyserver: http://pgpkeys.mit.edu
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFCA8ualJFYJP/fwTsRArcxAJ48cbDi6RjjtR6g6vyZatdib3Y9zwCfeaxk
ApVA+PjK0aEgrCX+ddo1a9o=
=oi6H
-END PGP SIGNATURE-
--
gentoo-user@gentoo.org mailing list


[gentoo-user] simple backups

2005-02-03 Thread Nick Smith
i read up on the man page of rsync and got that this command will backup
my server to another external drive i have:

mail root # rsync -avz / /mnt/backup/

but when i run that command i get a bunch of 'no such file errors' and
then it starts coping everything. is this bad?

building file list ... readlink //proc/2/task/2/exe failed: No such
file or directory
readlink //proc/2/exe failed: No such file or directory
readlink //proc/3/task/3/exe failed: No such file or directory
readlink //proc/3/exe failed: No such file or directory
readlink //proc/4/task/4/exe failed: No such file or directory
readlink //proc/4/exe failed: No such file or directory
readlink //proc/5/task/5/exe failed: No such file or directory
readlink //proc/5/exe failed: No such file or directory
readlink //proc/6/task/6/exe failed: No such file or directory
readlink //proc/6/exe failed: No such file or directory
readlink //proc/7/task/7/exe failed: No such file or directory
readlink //proc/7/exe failed: No such file or directory
readlink //proc/8/task/8/exe failed: No such file or directory
readlink //proc/8/exe failed: No such file or directory
readlink //proc/22/task/22/exe failed: No such file or directory
readlink //proc/22/exe failed: No such file or directory
readlink //proc/95/task/95/exe failed: No such file or directory
readlink //proc/95/exe failed: No such file or directory
readlink //proc/96/task/96/exe failed: No such file or directory
readlink //proc/96/exe failed: No such file or directory
readlink //proc/109/task/109/exe failed: No such file or directory
readlink //proc/109/exe failed: No such file or directory
readlink //proc/200/task/200/exe failed: No such file or directory
readlink //proc/200/exe failed: No such file or directory
readlink //proc/201/task/201/exe failed: No such file or directory
readlink //proc/201/exe failed: No such file or directory
readlink //proc/203/task/203/exe failed: No such file or directory
readlink //proc/203/exe failed: No such file or directory
readlink //proc/202/task/202/exe failed: No such file or directory
readlink //proc/202/exe failed: No such file or directory
readlink //proc/204/task/204/exe failed: No such file or directory
readlink //proc/204/exe failed: No such file or directory
readlink //proc/796/task/796/exe failed: No such file or directory
readlink //proc/796/exe failed: No such file or directory
readlink //proc/852/task/852/exe failed: No such file or directory
readlink //proc/852/exe failed: No such file or directory
readlink //proc/853/task/853/exe failed: No such file or directory
readlink //proc/853/exe failed: No such file or directory
readlink //proc/855/task/855/exe failed: No such file or directory
readlink //proc/855/exe failed: No such file or directory
readlink //proc/856/task/856/exe failed: No such file or directory
readlink //proc/856/exe failed: No such file or directory
readlink //proc/893/task/893/exe failed: No such file or directory
readlink //proc/893/exe failed: No such file or directory
readlink //proc/894/task/894/exe failed: No such file or directory
readlink //proc/894/exe failed: No such file or directory
readlink //proc/895/task/895/exe failed: No such file or directory
readlink //proc/895/exe failed: No such file or directory
readlink //proc/17853/task/17853/exe failed: No such file or directory
readlink //proc/17853/exe failed: No such file or directory
readlink //proc/17854/task/17854/exe failed: No such file or directory
readlink //proc/17854/exe failed: No such file or directory
done

the root drive is 80gig, and im backing up to an external 160gig drive,
in the event that the 80gig crashes will this be good enough to just
copy the contents back to another drive and have it boot work just like
before the crash? or am i going about this the wrong way? there is no X
on this machine so it will have to be console based. also ive never made
a cron job before, im using vixie-cron, how to i make this command run
every week on sunday at 3am?  

thanks for the info

Nick Smith

Gentoo Linux: Portage 2.0.51-r14. kernel-2.6.9-gentoo-r13. 2005 i686
Intel(R) Pentium(R) 4. gcc(GCC): 3.3.5. UPTIME 19 days, 19:20



--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] simple backups

2005-02-03 Thread Nick Smith
On Thu, 2005-02-03 at 11:04 -0500, Nick Smith wrote:
 i read up on the man page of rsync and got that this command will backup
 my server to another external drive i have:
 
 mail root # rsync -avz / /mnt/backup/
 
 but when i run that command i get a bunch of 'no such file errors' and
 then it starts coping everything. is this bad?
 
 building file list ... readlink //proc/2/task/2/exe failed: No such
 file or directory
 readlink //proc/2/exe failed: No such file or directory
 readlink //proc/3/task/3/exe failed: No such file or directory
 readlink //proc/3/exe failed: No such file or directory
 readlink //proc/4/task/4/exe failed: No such file or directory
 readlink //proc/4/exe failed: No such file or directory
 readlink //proc/5/task/5/exe failed: No such file or directory
 readlink //proc/5/exe failed: No such file or directory
 readlink //proc/6/task/6/exe failed: No such file or directory
 readlink //proc/6/exe failed: No such file or directory
 readlink //proc/7/task/7/exe failed: No such file or directory
 readlink //proc/7/exe failed: No such file or directory
 readlink //proc/8/task/8/exe failed: No such file or directory
 readlink //proc/8/exe failed: No such file or directory
 readlink //proc/22/task/22/exe failed: No such file or directory
 readlink //proc/22/exe failed: No such file or directory
 readlink //proc/95/task/95/exe failed: No such file or directory
 readlink //proc/95/exe failed: No such file or directory
 readlink //proc/96/task/96/exe failed: No such file or directory
 readlink //proc/96/exe failed: No such file or directory
 readlink //proc/109/task/109/exe failed: No such file or directory
 readlink //proc/109/exe failed: No such file or directory
 readlink //proc/200/task/200/exe failed: No such file or directory
 readlink //proc/200/exe failed: No such file or directory
 readlink //proc/201/task/201/exe failed: No such file or directory
 readlink //proc/201/exe failed: No such file or directory
 readlink //proc/203/task/203/exe failed: No such file or directory
 readlink //proc/203/exe failed: No such file or directory
 readlink //proc/202/task/202/exe failed: No such file or directory
 readlink //proc/202/exe failed: No such file or directory
 readlink //proc/204/task/204/exe failed: No such file or directory
 readlink //proc/204/exe failed: No such file or directory
 readlink //proc/796/task/796/exe failed: No such file or directory
 readlink //proc/796/exe failed: No such file or directory
 readlink //proc/852/task/852/exe failed: No such file or directory
 readlink //proc/852/exe failed: No such file or directory
 readlink //proc/853/task/853/exe failed: No such file or directory
 readlink //proc/853/exe failed: No such file or directory
 readlink //proc/855/task/855/exe failed: No such file or directory
 readlink //proc/855/exe failed: No such file or directory
 readlink //proc/856/task/856/exe failed: No such file or directory
 readlink //proc/856/exe failed: No such file or directory
 readlink //proc/893/task/893/exe failed: No such file or directory
 readlink //proc/893/exe failed: No such file or directory
 readlink //proc/894/task/894/exe failed: No such file or directory
 readlink //proc/894/exe failed: No such file or directory
 readlink //proc/895/task/895/exe failed: No such file or directory
 readlink //proc/895/exe failed: No such file or directory
 readlink //proc/17853/task/17853/exe failed: No such file or directory
 readlink //proc/17853/exe failed: No such file or directory
 readlink //proc/17854/task/17854/exe failed: No such file or directory
 readlink //proc/17854/exe failed: No such file or directory
 done
 
 the root drive is 80gig, and im backing up to an external 160gig drive,
 in the event that the 80gig crashes will this be good enough to just
 copy the contents back to another drive and have it boot work just like
 before the crash? or am i going about this the wrong way? there is no X
 on this machine so it will have to be console based. also ive never made
 a cron job before, im using vixie-cron, how to i make this command run
 every week on sunday at 3am?  
 
 thanks for the info
 
 Nick Smith
 
 Gentoo Linux: Portage 2.0.51-r14. kernel-2.6.9-gentoo-r13. 2005 i686
 Intel(R) Pentium(R) 4. gcc(GCC): 3.3.5. UPTIME 19 days, 19:20
 
 
 
sorry for replying to my own email, but i wanted to add, that it would
be nice if it would check to see if the file already existed from a
previous backup and if it had the same date/size etc it would skip it
and move on to the next file, because alot of these files wont be
changing (this is an email server, and archived mail wont change) does
my current setup allow for that or do i have to do something different?
because i think that would speed up backups considerably, no?

thanks again


--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] simple backups

2005-02-03 Thread Arran Fraser
On Thu, 2005-02-03 at 12:14, Nick Smith wrote:
 On Thu, 2005-02-03 at 11:04 -0500, Nick Smith wrote:
  i read up on the man page of rsync and got that this command will backup
  my server to another external drive i have:
  
  mail root # rsync -avz / /mnt/backup/
  
  but when i run that command i get a bunch of 'no such file errors' and
  then it starts coping everything. is this bad?
  

Well... it's probably not doing any harm, but rsync is trying to make
copies of /proc, which is not real files.  Try

rsync -avz --exclude=/proc / /mnt/backup/

Upon inspection, you'll find there are probably other places you'll want
to exclude.

  
 sorry for replying to my own email, but i wanted to add, that it would
 be nice if it would check to see if the file already existed from a
 previous backup and if it had the same date/size etc it would skip it
 and move on to the next file, because alot of these files wont be
 changing (this is an email server, and archived mail wont change) does
 my current setup allow for that or do i have to do something different?
 because i think that would speed up backups considerably, no?

rsync -a is already doing exactly that.  You should run rsync again
immediately after it's finished, and notice that only changed files are
listed the second time.


-- Arran


--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] simple backups

2005-02-03 Thread Andreas Vinsander
Nick Smith wrote:
On Thu, 2005-02-03 at 11:04 -0500, Nick Smith wrote:
i read up on the man page of rsync and got that this command will backup
my server to another external drive i have:
mail root # rsync -avz / /mnt/backup/
You should at least exclude /sys /proc /dev from the backup
A better alternative might be to use rdiff-backup which will do pretty 
much what u want including incremental backups and restores...

/Andreas
--
gentoo-user@gentoo.org mailing list


Re: [gentoo-user] simple backups

2005-02-03 Thread Matthew Cline
  building file list ... readlink //proc/2/task/2/exe failed: No such

You should always exclude the /proc filesystem from your backups. The
data there is generated dynamically by the kernel.


Matt

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] simple backups

2005-02-03 Thread Neil Bothwick
On Thu, 03 Feb 2005 11:04:57 -0500, Nick Smith wrote:

 mail root # rsync -avz / /mnt/backup/
 
 but when i run that command i get a bunch of 'no such file errors' and
 then it starts coping everything. is this bad?

You need to use the -x option to stop it trying to back up /dev, /proc,
/sys etc, or --exclude these directories specifically.

As for copying everything, that's what rsync does the first time. After
then, it updates. You should read the rsync man page again, there's a lot
there and it won't all take the first time.


-- 
Neil Bothwick

Linux users do it without paying a Bill


pgpRSwAqT3xz7.pgp
Description: PGP signature


Re: [gentoo-user] simple backups

2005-02-03 Thread Steve
Nick Smith wrote:
i read up on the man page of rsync and got that this command will backup
my server to another external drive i have:
 

rsync is not really intended for that sort of backup.
rsync is good at copying your own user files to a remote PC - it 
offers little or no advantage when simply copying between devices 
attached to your local PC.

I think you want to look at dd the disk duplicator.  This command will 
allow you to take an exact copy of a smaller hard-disk and store it on a 
larger one using a single command.. a restore operation uses a similar 
single command line.  Having made an image of your first disk you might 
consider compressing it - I'd expect your large disk to be suitable to 
store several compressed copies of your main drive.

The errors you saw were because not everything with a path in the file 
system is an ordinary file - in Unix-like operating systems devices 
are accessed by a path just like a file, but unlike a file cannot be 
just copied.


--
gentoo-user@gentoo.org mailing list


Re: [gentoo-user] simple backups

2005-02-03 Thread Neil Bothwick
On Thu, 03 Feb 2005 16:52:48 +, Steve wrote:

 rsync is good at copying your own user files to a remote PC - it 
 offers little or no advantage when simply copying between devices 
 attached to your local PC.

I disagree. rsync is excellent for keeping a local backup as it only
copies those files that have changed. dd takes for ever so is run rarely,
rsync can be run from /etc/cron.hourly if you wish.

rdiff-backup, as has already been mentioned, is probably better for this,
but it too is based on rsync.


-- 
Neil Bothwick

The trouble with doing something right the first time is that nobody
appreciates how difficult it was.


pgpSwWoWBLySN.pgp
Description: PGP signature


Re: [gentoo-user] simple backups

2005-02-03 Thread Steve
Neil Bothwick wrote:
On Thu, 03 Feb 2005 16:52:48 +, Steve wrote:
 

rsync is good at copying your own user files to a remote PC - it 
offers little or no advantage when simply copying between devices 
attached to your local PC.
  
I disagree. rsync is excellent for keeping a local backup as it only
copies those files that have changed. dd takes for ever so is run rarely,
rsync can be run from /etc/cron.hourly if you wish.
rdiff-backup, as has already been mentioned, is probably better for this,
but it too is based on rsync.
 

Fair comment... I stand corrected that rsync/rdiff-backup are 
appropriate for backup of user files.  This issue is an old one of trade 
off between being able to make fast backups and being able to recover 
quickly. IMHO the dd approach is still valid and useful as it is one of 
the few ways to ensure rapid disaster recovery. I agree that an rsync 
approach permits more frequent backups to be made for user files. Maybe 
a better recommendation would have been a combination of dd to take an 
image of the install - then rsync to keep regular copies of user files.


--
gentoo-user@gentoo.org mailing list


Re: [gentoo-user] simple backups

2005-02-03 Thread David D. Rea
On Thu, February 3, 2005 11:04 am, Nick Smith said:
 i read up on the man page of rsync and got that this command will backup
 my server to another external drive i have:

 mail root # rsync -avz / /mnt/backup/

 but when i run that command i get a bunch of 'no such file errors' and
 then it starts coping everything. is this bad?

[snip]

 the root drive is 80gig, and im backing up to an external 160gig drive,
 in the event that the 80gig crashes will this be good enough to just
 copy the contents back to another drive and have it boot work just like
 before the crash? or am i going about this the wrong way? there is no X
 on this machine so it will have to be console based. also ive never made
 a cron job before, im using vixie-cron, how to i make this command run
 every week on sunday at 3am?

Correct me if I'm wrong, but shouldn't you also exclude the mountpoint to
which you're backing up? I would think that rsync would be able to detect
a potential infinite recursion, but I've never tried it myself. Idea here
is that you shouldn't include the backup destination in the backup itself,
and since you're backing up / and /mnt/backup is part of /, you'd think it
would have recursion problems.

To make the job run Sundays at 0300, first run `crontab -e` as the user
who should run the cron'd command. It sounds like you'd need it to be root
if you don't want to get permission errors, but you may want to create a
different user to run the cron job, then do fun things with groups in
order to get access to the files you need. That, or create a new user who
is a member of the root group, edit the crontab, then change the login
shell for that user to /dev/null so that they can't log in.

Running `crontab -e` will open your favorite editor (as defined by your
EDITOR environment variable) in which you can add crontab lines. Their
syntax can be found here:

http://www.adminschoice.com/docs/crontab.htm

I'd also recommend, after you get things running smoothly, using the
quiet switch to cut rsync's output. That is, unless you want a report
e-mailed daily to the user whose crontab contains the rsync command. If
this user is really restricted, you might end up seeing a lot of sendmail
(or other MTA) errors in your logs. Wouldn't want to bog down your local
MTA's queue with a whole nutload of cron reports that can't be delivered!

Best of luck,
Dave

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] simple backups

2005-02-03 Thread Neil Bothwick
On Thu, 03 Feb 2005 18:06:27 +, Steve wrote:

 Fair comment... I stand corrected that rsync/rdiff-backup are 
 appropriate for backup of user files.  This issue is an old one of trade
 off between being able to make fast backups and being able to recover 
 quickly. IMHO the dd approach is still valid and useful as it is one of 
 the few ways to ensure rapid disaster recovery. I agree that an rsync 
 approach permits more frequent backups to be made for user files. Maybe 
 a better recommendation would have been a combination of dd to take an 
 image of the install - then rsync to keep regular copies of user files.

I'd still disagree, rsync or rdiff-backup create an exact mirror of the
file tree, so you have a backup that is extremely fast to restore from,
especially for individual files. If I want an image of the partition, I'll
use partimage as it is several orders of magnitude faster than dd and
produces smaller archives.

As a backup tool dd is about as friendly as backing up to punched cards :(


-- 
Neil Bothwick

Gotta run, cat's caught in the printer...


pgptUH9kNdR6G.pgp
Description: PGP signature


Re: [gentoo-user] simple backups

2005-02-03 Thread Steve
Neil Bothwick wrote:
On Thu, 03 Feb 2005 18:06:27 +, Steve wrote:
 

Fair comment... I stand corrected that rsync/rdiff-backup are 
appropriate for backup of user files.  This issue is an old one of trade
off between being able to make fast backups and being able to recover 
quickly. IMHO the dd approach is still valid and useful as it is one 
of the few ways to ensure rapid disaster recovery. I agree that an 
rsync approach permits more frequent backups to be made for user 
files. Maybe a better recommendation would have been a combination of 
dd to take an image of the install - then rsync to keep regular 
copies of user files.
  

I'd still disagree, rsync or rdiff-backup create an exact mirror of the
file tree, so you have a backup that is extremely fast to restore from,
especially for individual files. If I want an image of the partition, 
I'll
use partimage as it is several orders of magnitude faster than dd and
produces smaller archives.

As a backup tool dd is about as friendly as backing up to punched 
cards :(

 

OK - I also admit that partimage would be a superior choice to dd...
I guess my only significant point is that a backup that quickly restores 
devices etc. is not addressed best by trying to copy files.  I guess I 
inferred more from the original subject than you did.  For a Simple 
Backup where you want to duplicate everything from one drive to 
another I remain convinced that you want to copy the partition(s) and 
not the files - whereas for a more ambitious incremental backup strategy 
of user files we agree that rsync/rdiff approaches may well prove superior.
Among the complications involved with rsync one should consider the 
potential consequences of a hardware failure during an update phase; the 
possibility that a file is accidentally deleted and the backup is 
refreshed before the missing file discovered.
For a mail server, I can't help thinking that the ideal solution would 
be some (possibly bespoke) mechanism to push emails from the primary 
server to a secondary server (or maybe just a secondary disk) as it 
arrives (possibly with a queue as necessary) and not to delete data from 
the secondary server when it is deleted from the first, but rather to 
archive the eldest data regularly in order to ensure the disks do not 
fill.  This, however, could not be considered a simple backup by most. 
[Neil - you'd impress me by naming a tool that would do this 'ideal 
solution' without the need for writing bespoke scripts...]

Do we still disagree? :-)

--
gentoo-user@gentoo.org mailing list


Re: [gentoo-user] simple backups

2005-02-03 Thread Abap
Another option for doing backups is snapback2.  It uses rsync, and has
some really nice features.  I have contributed an ebuild, and it can
be found on http://bugs.gentoo.org, just search on snapback2.

Kevin


On Thu, 03 Feb 2005 19:27:34 +, Steve [EMAIL PROTECTED] wrote:
 Neil Bothwick wrote:
 
  On Thu, 03 Feb 2005 18:06:27 +, Steve wrote:
 
 
 
  Fair comment... I stand corrected that rsync/rdiff-backup are
  appropriate for backup of user files.  This issue is an old one of trade
  off between being able to make fast backups and being able to recover
  quickly. IMHO the dd approach is still valid and useful as it is one
  of the few ways to ensure rapid disaster recovery. I agree that an
  rsync approach permits more frequent backups to be made for user
  files. Maybe a better recommendation would have been a combination of
  dd to take an image of the install - then rsync to keep regular
  copies of user files.
 
 
 
  I'd still disagree, rsync or rdiff-backup create an exact mirror of the
  file tree, so you have a backup that is extremely fast to restore from,
  especially for individual files. If I want an image of the partition,
  I'll
  use partimage as it is several orders of magnitude faster than dd and
  produces smaller archives.
 
  As a backup tool dd is about as friendly as backing up to punched
  cards :(
 
 
 
 
 OK - I also admit that partimage would be a superior choice to dd...
 I guess my only significant point is that a backup that quickly restores
 devices etc. is not addressed best by trying to copy files.  I guess I
 inferred more from the original subject than you did.  For a Simple
 Backup where you want to duplicate everything from one drive to
 another I remain convinced that you want to copy the partition(s) and
 not the files - whereas for a more ambitious incremental backup strategy
 of user files we agree that rsync/rdiff approaches may well prove superior.
 Among the complications involved with rsync one should consider the
 potential consequences of a hardware failure during an update phase; the
 possibility that a file is accidentally deleted and the backup is
 refreshed before the missing file discovered.
 For a mail server, I can't help thinking that the ideal solution would
 be some (possibly bespoke) mechanism to push emails from the primary
 server to a secondary server (or maybe just a secondary disk) as it
 arrives (possibly with a queue as necessary) and not to delete data from
 the secondary server when it is deleted from the first, but rather to
 archive the eldest data regularly in order to ensure the disks do not
 fill.  This, however, could not be considered a simple backup by most.
 [Neil - you'd impress me by naming a tool that would do this 'ideal
 solution' without the need for writing bespoke scripts...]
 
 Do we still disagree? :-)
 
 
 --
 gentoo-user@gentoo.org mailing list
 


--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] simple backups

2005-02-03 Thread Jason Cooper
Neil Bothwick ([EMAIL PROTECTED]) scribbled:
 On Thu, 03 Feb 2005 18:06:27 +, Steve wrote:
 
  Fair comment... I stand corrected that rsync/rdiff-backup are 
  appropriate for backup of user files.  This issue is an old one of trade
  off between being able to make fast backups and being able to recover 
  quickly. IMHO the dd approach is still valid and useful as it is one of 
  the few ways to ensure rapid disaster recovery. I agree that an rsync 
  approach permits more frequent backups to be made for user files. Maybe 
  a better recommendation would have been a combination of dd to take an 
  image of the install - then rsync to keep regular copies of user files.
 
 I'd still disagree, rsync or rdiff-backup create an exact mirror of the
 file tree, so you have a backup that is extremely fast to restore from,
 especially for individual files. If I want an image of the partition, I'll
 use partimage as it is several orders of magnitude faster than dd and
 produces smaller archives.
 
 As a backup tool dd is about as friendly as backing up to punched cards :(

Why not a combination of the two?  Use dd to a file to create an initial
image of the partition.  Then, once per night, mount it as a loopback
file, and rsync it... 

This way if you have a catastrophic drive failure, you can low-level
re-image the drive.

2c yada.

Cooper.

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] simple backups

2005-02-03 Thread Tamas Sarga

On Thu, 3 Feb 2005, Steve wrote:


snip

 I think you want to look at dd the disk duplicator.  This command will
 allow you to take an exact copy of a smaller hard-disk and store it on a
 larger one using a single command.. a restore operation uses a similar
 single command line.  Having made an image of your first disk you might
 consider compressing it - I'd expect your large disk to be suitable to
 store several compressed copies of your main drive.

snip


Be careful with compression. If a huge compressed file damages, the
whole file could be useless.

Cheers,
Tamas Sarga
--
A day is 24 hours long. Egy nap 24 rbl ll.
A box of beer contains 24 bottles.  Egy tlcn 24 veg sr van.
I don't believe in coincidence. Nem hiszek a vletlen egybeessekben.

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] simple backups

2005-02-03 Thread Neil Bothwick
On Thu, 03 Feb 2005 19:27:34 +, Steve wrote:

  I'd still disagree, rsync or rdiff-backup create an exact mirror of
  the file tree, so you have a backup that is extremely fast to restore
  from, especially for individual files. If I want an image of the
  partition,  I'll
  use partimage as it is several orders of magnitude faster than dd and
  produces smaller archives.
 
  As a backup tool dd is about as friendly as backing up to punched 
  cards :(

 OK - I also admit that partimage would be a superior choice to dd...
 I guess my only significant point is that a backup that quickly restores
 devices etc. is not addressed best by trying to copy files.  I guess I 
 inferred more from the original subject than you did.  For a Simple 
 Backup where you want to duplicate everything from one drive to 
 another I remain convinced that you want to copy the partition(s) and 
 not the files - whereas for a more ambitious incremental backup strategy
 of user files we agree that rsync/rdiff approaches may well prove
 superior. 

It depends on what you are insuring against. To cover drive failure, a
partition image is best,and fastest to restore a whole drive. I make
partimage backups from time to time. To insure against operator error,
such as deleting a file, overwriting a working config with a broken one
etc, file based backups are better. So you really need both.

 Among the complications involved with rsync one should
 consider the  potential consequences of a hardware failure during an
 update phase; the  possibility that a file is accidentally deleted and
 the backup is  refreshed before the missing file discovered.

That's an issue with rsync, but not with rdiff-backup, which keeps older
files. You can restore older versions of files, or deleted files for as
long as they stay in the backup.

 For a mail server, I can't help thinking that the ideal solution would 
 be some (possibly bespoke) mechanism to push emails from the primary 
 server to a secondary server (or maybe just a secondary disk) as it 
 arrives (possibly with a queue as necessary) and not to delete data from
 the secondary server when it is deleted from the first, but rather to 
 archive the eldest data regularly in order to ensure the disks do not 
 fill.  This, however, could not be considered a simple backup by most. 
 [Neil - you'd impress me by naming a tool that would do this 'ideal 
 solution' without the need for writing bespoke scripts...]

You can use a procmail rule to send a copy of a mail to a backup file.

:0c:
/mnt/backup/mail/$USER.backup


 Do we still disagree? :-)

Not now, but I'm sure I can think of something, given time ;-)


-- 
Neil Bothwick

Loose bits sink chips.

--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] simple backups

2005-02-03 Thread Nick Smith
On Thu, 2005-02-03 at 17:19 +0100, Andreas Vinsander wrote:
 Nick Smith wrote:
  On Thu, 2005-02-03 at 11:04 -0500, Nick Smith wrote:
  
 i read up on the man page of rsync and got that this command will backup
 my server to another external drive i have:
 
 mail root # rsync -avz / /mnt/backup/
 
 You should at least exclude /sys /proc /dev from the backup
 
 A better alternative might be to use rdiff-backup which will do pretty 
 much what u want including incremental backups and restores...
 
 /Andreas
 
well what is the difference between rsync and rdiff-backup if the latter
is based on rsync? was there something added?


--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] simple backups

2005-02-03 Thread Nick Smith
On Thu, 2005-02-03 at 16:25 +, Neil Bothwick wrote:
 On Thu, 03 Feb 2005 11:04:57 -0500, Nick Smith wrote:
 
  mail root # rsync -avz / /mnt/backup/
  
  but when i run that command i get a bunch of 'no such file errors' and
  then it starts coping everything. is this bad?
 
 You need to use the -x option to stop it trying to back up /dev, /proc,
 /sys etc, or --exclude these directories specifically.
 
 As for copying everything, that's what rsync does the first time. After
 then, it updates. You should read the rsync man page again, there's a lot
 there and it won't all take the first time.
 
 
when i try rdiff-backup i get this:

mail root # rdiff-backup --include / \
--exclude /dev /proc /sys /mnt/backup/system \
Error: Switches missing or wrong number of arguments \
See the rdiff-backup manual page for instructions \

i even made a file list.txt with this in it:
/
- /sys
- /proc
- /dev
- /mnt/backup

and ran the command:

 mail root # rdiff-backup --exclude-filelist \
list.txt /mnt/backup/system_backup/

and i get the same error, what am i doing wrong?





--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] simple backups

2005-02-03 Thread Steve




Neil Bothwick wrote:

  
Among the complications involved with rsync one should
consider the  potential consequences of a hardware failure during an
update phase; the  possibility that a file is accidentally deleted and
the backup is  refreshed before the missing file discovered.

  
  
That's an issue with rsync, but not with rdiff-backup, which keeps older
files. You can restore older versions of files, or deleted files for as
long as they stay in the backup.
  

I like being the less up-to-date - it is more interesting. :-) I've
rdiff-backup on my list of man-pages to read.


  
  
For a mail server, I can't help thinking that the ideal solution would 
be some (possibly bespoke) mechanism to push emails from the primary 
server to a secondary server (or maybe just a secondary disk) as it 
arrives (possibly with a queue as necessary) and not to delete data from
the secondary server when it is deleted from the first, but rather to 
archive the eldest data regularly in order to ensure the disks do not 
fill.  This, however, could not be considered a simple backup by most. 
[Neil - you'd impress me by naming a tool that would do this 'ideal 
solution' without the need for writing bespoke scripts...]

  
  
You can use a procmail rule to send a copy of a mail to a backup file.

:0c:
/mnt/backup/mail/$USER.backup
  

Of course, but (I ask provocatively) - won't that use mailbox rather
than maildir format -hence introducing complications of locking? Isn't
there an issue in getting this to be a system wide setting not a
per-user thing? For a mail server with centralised administration -
isn't something closer to the MTA more appropriate?

[BTW - you didn't solve the archiving bit :-P ]


  
  
Do we still disagree? :-)

  
  
Not now, but I'm sure I can think of something, given time ;-)

  

That's good - people who agree with me are usually dull. :-)

Steve




Re: [gentoo-user] simple backups

2005-02-03 Thread Neil Bothwick
On Fri, 04 Feb 2005 00:14:25 +, Steve wrote:

 That's an issue with rsync, but not with rdiff-backup, which keeps
 older files. You can restore older versions of files, or deleted files
 for as long as they stay in the backup.

 I like being the less up-to-date  - it is more interesting. :-)  I've 
 rdiff-backup on my list of man-pages to read.

I was fortunate enough to be paid to write a review of backup software
recently. It forced me to put my house in order :)

 For a mail server, I can't help thinking that the ideal solution would
 be some (possibly bespoke) mechanism to push emails from the primary 
 server to a secondary server (or maybe just a secondary disk) as it 
 arrives (possibly with a queue as necessary) and not to delete data
 from the secondary server when it is deleted from the first, but
 rather to  archive the eldest data regularly in order to ensure the
 disks do not  fill.  This, however, could not be considered a simple
 backup by most.  [Neil - you'd impress me by naming a tool that would
 do this 'ideal  solution' without the need for writing bespoke
 scripts...] 
 
 
 You can use a procmail rule to send a copy of a mail to a backup file.
 
 :0c:
 /mnt/backup/mail/$USER.backup
   
 
 Of course, but (I ask provocatively) - won't that use mailbox rather 
 than maildir format -hence introducing complications of locking?

The trailing colon forces procmail to use, and respect, file locks. it's
probably possibly to do it in maildir instead, but I still use mailbox
files here. Switching over is somewhere on my list of things to do.

 there an issue in getting this to be a system wide setting not a 
 per-user thing? For a mail server with centralised administration - 
 isn't something closer to the MTA more appropriate?

You could put a rule like this in the global procmail file. i'm sure there
are better ways of doing it, especially on a medium to large scale setup,
but it works for me.

 [BTW - you didn't solve the archiving bit :-P ]

OK, that is a (very short) custom script, that archives the backup files
once a week.

 That's good - people who agree with me are usually dull.  :-)

Should I agree or disagree with that? ;-)


-- 
Neil Bothwick

667 - The FAX number of the beast


pgpjaR1JR6xWA.pgp
Description: PGP signature


Re: [gentoo-user] simple backups

2005-02-03 Thread Neil Bothwick
On Thu, 03 Feb 2005 11:50:17 -0500, Nick Smith wrote:

 when i try rdiff-backup i get this:
 
 mail root # rdiff-backup --include / \
 --exclude /dev /proc /sys /mnt/backup/system \
 Error: Switches missing or wrong number of arguments \
 See the rdiff-backup manual page for instructions \
 
 i even made a file list.txt with this in it:
 /
 - /sys
 - /proc
 - /dev
 - /mnt/backup
 
 and ran the command:
 
  mail root # rdiff-backup --exclude-filelist \
 list.txt /mnt/backup/system_backup/
 
 and i get the same error, what am i doing wrong?

You haven't given a source directory. --include only specifies files
within the source to include and it used to override parts of an
--exclude. You need

# cat list.txt
/sys
/proc
/dev
/mnt/backup

rdiff-backup --exclude-filelist list.txt / /mnt/backup/system_backup/


-- 
Neil Bothwick

Sacred cows make great hamburgers.


pgpPNMLqC49Cx.pgp
Description: PGP signature