FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 01-14-2010, 12:37 PM
Adam Hardy
 
Default lenny backups and recovery

Just recovered from a kernel-not-loading situation, without any data loss and
happily wondering what I should do now to make sure I don't get the same
adrenalin shot next time it happens.


I do have a removable usb hard drive for backups, onto which I copy stuff using
cp -rp *


and I'm wondering how I should copy my linux configuration, and then how I
restore it too when needed.


Do I just do

cp -rp /etc /media/external

and on recovery, just install all packages and then copy the whole /etc back?

I am looking at
http://www.tldp.org/HOWTO/Linux-Complete-Backup-and-Recovery-HOWTO/overview.html
but it was last updated in 2006 so I figure there might be some useful new stuff
too somewhere.


Also wondering what the lenny installation cd 'rescue mode' does - and whether I
need a boot floppy with a copy of my partition info?



Thanks
Adam


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-14-2010, 03:13 PM
Robert Brockway
 
Default lenny backups and recovery

On Thu, 14 Jan 2010, Adam Hardy wrote:

Just recovered from a kernel-not-loading situation, without any data loss and
happily wondering what I should do now to make sure I don't get the same
adrenalin shot next time it happens.


Hi Adam. Below are the notes from my talk on backups. My opinions on this
topic are forged by 15 years of real world experience including very large
disaster recoveries (10s of TB) following SAN failures.


http://www.timetraveller.org/talks/backup_talk.pdf

Cheers,

Rob

--
Email: robert@timetraveller.org
IRC: Solver
Web: http://www.practicalsysadmin.com
I tried to change the world but they had a no-return policy


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-15-2010, 09:48 PM
Paul E Condon
 
Default lenny backups and recovery

On 20100114_133757, Adam Hardy wrote:
> Just recovered from a kernel-not-loading situation, without any data
> loss and happily wondering what I should do now to make sure I don't
> get the same adrenalin shot next time it happens.
>
> I do have a removable usb hard drive for backups, onto which I copy
> stuff using cp -rp *
>
> and I'm wondering how I should copy my linux configuration, and then
> how I restore it too when needed.
>
> Do I just do
>
> cp -rp /etc /media/external
>
> and on recovery, just install all packages and then copy the whole /etc back?
>
> I am looking at http://www.tldp.org/HOWTO/Linux-Complete-Backup-and-Recovery-HOWTO/overview.html
> but it was last updated in 2006 so I figure there might be some
> useful new stuff too somewhere.
>
> Also wondering what the lenny installation cd 'rescue mode' does -
> and whether I need a boot floppy with a copy of my partition info?

Hi, Adam

I took a look at the tldp document and don't like it. I would even
characterize it as somewhat wrong headed. I understand the goal, but...

For you, an individual user of a self administered Lenny, there are
things that you need not do (because you are using Debian) and things
that they advise, but that I think are ill advised, whatever your OS.

I think that your disaster recovery system should not be something
that is separate and distinct from your daily backups. Rather it
should be integrated into your daily system in such a way that you are
aware that it has done its data recording function within the last 24
hours --- always. You may think you cannot afford to do a full backup
-every- -day-, but you can, if you use, for example, rsync, instead of
cp. The first time that you use rsync to do a backup it is no faster
than cp, but subsequent backups automatically copy only the files that
have actually changed and only the changed portions of those changed
files. Furthermore, rsync has an operating mode in which it uses
hard-links to allow you to keep many daily backups.

Contrary to tldp advice, I think it is unnecessary to make backups
of /bin or /sbin. These files are readily available from you favorite
Debian repository, and if your system has crashed in some serious
way, you would be well advised to download again, once you think you
have resolved the issue that caused the crash. Think about it ---
if you have to restore one of these, something really bad has happened
and you can't be sure that something -else- bad hasn't also happened -
but you haven't noticed it - yet.

But there are files that are you own, entirely, or contain little gems
of information about your personal setup. You should make backups of
these, i.e. daily backup using rsync. So you should
make backups of /home and /etc, at least.

Now a big advantage of Debian: The File Heirarchy Standard (FHS)
limits the number of different places user information can be
stored. If you read it and place you stuff only according to FHS, you
can be confident that you that your configuration stuff is only in
/etc (but only if you only use software that has been package by
Debian). So you really shouldn't need to backup anything else.

But there are exceptions:
1. Personal crontabs are in /var/spool/cron/crontabs.

2. Definitive information about what kernel you are running is in /boot.

3. Definitive information about what packages are installed.

4. You need to have a place to keep the code for your backup system where
it won't conflict with every day user/sysadmin work, and common advice
about how to do that work. I put the core stuff of my backup in /root,
including a package-list generated daily by aptitude:

aptitude -F "%p %M" search '~i' |tr -s ' '|sed 's/ A$/+M/' >/root/package-list


So, IMHO, what needs to be backed up is:
/boot /etc /home /root /var/spool/cron/crontabs

The rest may be essential for a functioning personal computer, but not
for recovery from a mistake or malfunction.


Note on rsync:

To use rsync as I do, you need to be aware of the option,
--link-dest=<file>.

This option gives to rsync a link to a candidate file system that
contains an old version of the files that are being backed up, i.e.
yesterday's backup. If a file from yesterday still matches the file
that is being backed up, rsync simply makes a hard-link in today's
file structure to that file in yesterday's file structure.


--
Paul E Condon
pecondon@mesanetworks.net


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-18-2010, 12:24 PM
Adam Hardy
 
Default lenny backups and recovery

Paul E Condon on 15/01/10 22:48, wrote:

On 20100114_133757, Adam Hardy wrote:

Just recovered from a kernel-not-loading situation, without any data
loss and happily wondering what I should do now to make sure I don't
get the same adrenalin shot next time it happens.
[snipped]
I am looking at http://www.tldp.org/HOWTO/Linux-Complete-Backup-and-Recovery-HOWTO/overview.html
but it was last updated in 2006 so I figure there might be some
useful new stuff too somewhere.

Also wondering what the lenny installation cd 'rescue mode' does -
and whether I need a boot floppy with a copy of my partition info?


Hi, Adam

I took a look at the tldp document and don't like it. I would even
characterize it as somewhat wrong headed. I understand the goal, but...

[snip]

Thanks Paul for the info re rsync. Plus I was unaware that I needed to backup /boot

Is there a new way to create a rescue disk which will allow me to rescue a hard
drive if the partitions get trashed? I was wondering if there was a similar sort
of menu-based program a bit like the "rescue mode" option on the lenny install cd?



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-19-2010, 03:07 AM
Paul E Condon
 
Default lenny backups and recovery

On 20100118_132425, Adam Hardy wrote:
> Paul E Condon on 15/01/10 22:48, wrote:
> >On 20100114_133757, Adam Hardy wrote:
> >>Just recovered from a kernel-not-loading situation, without any data
> >>loss and happily wondering what I should do now to make sure I don't
> >>get the same adrenalin shot next time it happens.
> >>[snipped]
> >>I am looking at http://www.tldp.org/HOWTO/Linux-Complete-Backup-and-Recovery-HOWTO/overview.html
> >>but it was last updated in 2006 so I figure there might be some
> >>useful new stuff too somewhere.
> >>
> >>Also wondering what the lenny installation cd 'rescue mode' does -
> >>and whether I need a boot floppy with a copy of my partition info?
> >
> >Hi, Adam
> >
> >I took a look at the tldp document and don't like it. I would even
> >characterize it as somewhat wrong headed. I understand the goal, but...
> [snip]
>
> Thanks Paul for the info re rsync. Plus I was unaware that I needed to backup /boot

I should clearify my attitude toward backing up /boot:
1. I assume that I have a daily backup system up and running reliably.
2. I want to have a human (me) readable record of which version of
the kernel I actually need to restore if I have to do a major recovery.
3. I don't want to have handwritten notes that I have to find in the
midst of the chaos of a malfunctioning computer.
4. If I actually don't have a usable backup disk. Hand written notes
are pretty much worthless. So ..

ls /boot on the backup disk is a good way to know where to start. And it
doesn't involve remembering to make a note when/if I move to a different
kernel.

I wouldn't try to do a file restore from /boot on the backup disk. If
the kernel file is damaged or lost, I want to do an apt-get install to
get all the other stuff that a kernel install puts on the computer.

>
> Is there a new way to create a rescue disk which will allow me to
> rescue a hard drive if the partitions get trashed? I was wondering if
> there was a similar sort of menu-based program a bit like the "rescue
> mode" option on the lenny install cd?
>

The rescue mode on the Lenny install CD is the only rescue mode that I
believe has actually been tested with Lenny by people who have some
idea of what it is supposed to do. My faith might be misplaced, but
not likely, IMHO.

But I would not use it to recover partitions on my boot drive. My
opinion is that when my computer is malfunctioning seriously such that
I can't get it going again by booting into single user mode and poking
around a bit - then I want to have a cleanly functioning computer on
which to work *before* I try to get my personal stuff working
again. I'll need a functioning computer to access this list and ask
for advice.

Recovering trashed partitions is for when you don't have a backup and
are desperate to recover something --- anything, IMHO. I wouldn't
-plan- to use partition recovery on my boot drive as part of my
-planned- response to a malfunction. If I ever have trashed partitions
-and- my backup disks are -all- unreadable, I will find another
computer or replace the HD and do a fresh install on the replacement
HD or something else before I touch the old HD that appears to have
trashed partitions. It may be that the old HD is actually fine and
that the problem is some other hardware e.g. the motherboard.


--
Paul E Condon
pecondon@mesanetworks.net


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-21-2010, 01:54 PM
Robert Brockway
 
Default lenny backups and recovery

On Fri, 15 Jan 2010, Paul E Condon wrote:


Contrary to tldp advice, I think it is unnecessary to make backups
of /bin or /sbin. These files are readily available from you favorite


I'm very much a fan of backing up the entire system (with limited
exceptions, such as an area set aside for the storage of downloads, that
is not backed up.


The problem is that unless you restore to the _same_ binary you can't
guarantee the same behaviour. This is essential in the case of server
backups where there is little tolerance for behavioural changes but still
applies to desktop systems.


A similar argument applies to the complete setup of the system. Despite
the best change management, small and non-obvious changes can occur in a
system. If you reinstall from the repo and restore the config from /etc
you may still be missing something (eg, a symlink) and find an app is
broken when it was previously working. Backing up the entire state of the
system means that when you do a DR you get back a known working copy of
the system, since it was working before.


I'd consider having to reinstall from original media a failure of the DR
system.


When I first started with Linux the system (binaries and config) took up
about 80% of the disk. Now it takes up less than 2%, so backing up the
system components hardly adds any pressure to the backup system. It also
allows for a much faster recovery following a DR.


Also, important data has a way of hiding in more places on the disk that
you think it will. If you start excluding parts of your system from the
backups you increase the liklihood of missing something important in the
backups.


This is covered in more detail in my backup talk notes (which I did
mention earlier in the thread):


http://www.timetraveller.org/talks/backup_talk.pdf


Debian repository, and if your system has crashed in some serious
way, you would be well advised to download again, once you think you
have resolved the issue that caused the crash. Think about it ---
if you have to restore one of these, something really bad has happened
and you can't be sure that something -else- bad hasn't also happened -
but you haven't noticed it - yet.


That's where testing of the backup system comes in. You never know that
DR will work unless you test it.


Cheers,

Rob

--
Email: robert@timetraveller.org
IRC: Solver
Web: http://www.practicalsysadmin.com
I tried to change the world but they had a no-return policy


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-21-2010, 10:48 PM
Paul E Condon
 
Default lenny backups and recovery

On 20100121_095411, Robert Brockway wrote:
> On Fri, 15 Jan 2010, Paul E Condon wrote:
>
> >Contrary to tldp advice, I think it is unnecessary to make backups
> >of /bin or /sbin. These files are readily available from you favorite
>
> I'm very much a fan of backing up the entire system (with limited
> exceptions, such as an area set aside for the storage of downloads,
> that is not backed up.
>
> The problem is that unless you restore to the _same_ binary you can't
> guarantee the same behaviour. This is essential in the case of
> server backups where there is little tolerance for behavioural
> changes but still applies to desktop systems.
>
> A similar argument applies to the complete setup of the system.
> Despite the best change management, small and non-obvious changes can
> occur in a system. If you reinstall from the repo and restore the
> config from /etc you may still be missing something (eg, a symlink)
> and find an app is broken when it was previously working. Backing up
> the entire state of the system means that when you do a DR you get
> back a known working copy of the system, since it was working before.
>
> I'd consider having to reinstall from original media a failure of the
> DR system.
>
> When I first started with Linux the system (binaries and config) took
> up about 80% of the disk. Now it takes up less than 2%, so backing up
> the system components hardly adds any pressure to the backup system.
> It also allows for a much faster recovery following a DR.
>
> Also, important data has a way of hiding in more places on the disk
> that you think it will. If you start excluding parts of your system
> from the backups you increase the liklihood of missing something
> important in the backups.
>
> This is covered in more detail in my backup talk notes (which I did
> mention earlier in the thread):
>
> http://www.timetraveller.org/talks/backup_talk.pdf
>
> >Debian repository, and if your system has crashed in some serious
> >way, you would be well advised to download again, once you think you
> >have resolved the issue that caused the crash. Think about it ---
> >if you have to restore one of these, something really bad has happened
> >and you can't be sure that something -else- bad hasn't also happened -
> >but you haven't noticed it - yet.
>
> That's where testing of the backup system comes in. You never know
> that DR will work unless you test it.
>
> Cheers,
>
> Rob

Rob,

I think we have different working conditions in mind. And, anyway, my
comments were directed toward the system given in the tldp.org
document. I see your document as advice to the systems people in a
small business. It is good advice, and I commend you for it.

I imagined OP to be somewhat of a newbie and slightly overwhelmed, not
a systems person in a small business. I now think OP is not so much a
newbie, and is quite capable of ignoring advice that doesn't address
his issues, but that was the context for what I wrote.

The tldp.org document is entitled
"Linux-Complete-Backup-and-Recovery-HOWTO". One of the first things I
noticed about it is that it assumes that you already -have- a daily
backup system in place, and then it makes no attempt to integrate what
it is presenting with that system, or even suggest a review of the
design of that system. And yet it claims to be 'complete'.

I think we can agree, it is not complete.
Peace.
--
Paul E Condon
pecondon@mesanetworks.net


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-22-2010, 01:12 AM
Robert Brockway
 
Default lenny backups and recovery

On Thu, 21 Jan 2010, Paul E Condon wrote:


"Linux-Complete-Backup-and-Recovery-HOWTO". One of the first things I
noticed about it is that it assumes that you already -have- a daily
backup system in place, and then it makes no attempt to integrate what
it is presenting with that system, or even suggest a review of the
design of that system. And yet it claims to be 'complete'.

I think we can agree, it is not complete.


Hi Paul. Thanks for your reply. I probably read that doc years and years
ago although I don't remember anything about it I'll go reread it.


Cheers,

Rob

--
Email: robert@timetraveller.org
IRC: Solver
Web: http://www.practicalsysadmin.com
I tried to change the world but they had a no-return policy


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-26-2010, 11:46 PM
Celejar
 
Default lenny backups and recovery

On Fri, 15 Jan 2010 15:48:32 -0700
Paul E Condon <pecondon@mesanetworks.net> wrote:

...

> So, IMHO, what needs to be backed up is:
> /boot /etc /home /root /var/spool/cron/crontabs

Other parts of /var you might want to back up:

/var/log
/var/mail

Celejar
--
foffl.sourceforge.net - Feeds OFFLine, an offline RSS/Atom aggregator
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 10:08 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org