Re: disaster recovery: I can't login

2008-04-19 Thread Mel
On Saturday 19 April 2008 11:08:36 Dino Vliet wrote:
>Hi folks,
>Yesterday disaster struck after I wanted to remove Gnome and issued
>the following command:
> pkg_deinstall -R x11/gnome* -x evolution
> I went to sleep and when I woke up I rebooted and got the login
> screen iso my normal graphical GDM. I logged in as I normally do
>  and thought I was logged in because I saw a line saying I had
> mail, but then the line below that one said:
> /usr/local/bin/bash was not found.
> As root I coudn't login as well, so I sat a while looking at my
> screen and looking for options.

And at this point, you should reboot the machine in single user mode. You can 
then pick /bin/sh as the shell.

-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: disaster recovery - did I do the right thing?

2007-05-08 Thread Bernd Trippel
Martin Tournoij typed on 06/05/07 05:23:
> On Sat 05 May 2007 18:05, Garrett Cooper wrote:
>> Martin Tournoij wrote:
>>> On Sat 05 May 2007 17:05, Ray wrote:
 Hello all,
 I did something stupid the other day (sleep deprivation combined with a 
 "clever" hack were the main reasons), and I'm just curious if I did 
 the right thing afterwards.

 The mistake:
 /usr/local/# rm -f *
 note that root was running bash as a shell at the time, found in 
 /usr/local/bin or something.

 What I did was to start over, reinstall from scratch.
 my question, was there an easier way?
 thanks,
 Ray 
>>> You can use pkg_info -ga to check for missing files in your packages.
>> For (t)csh:
>> alias rm "rm -i"
>>
>> For (ba)sh:
>> alias rm="rm -i"
>>
>> Now that you've learned :).
>>
>> Martin's suggestion is good though -- would have done that considering that 
>> all that lived in /usr/local were ports.
>>
>> -Garrett
> 
> The problem with this is that it will ask confirmation for every file it
> deleted.
> Which is gets pretty annoying after a while, also, if you delete a
> directory containing a 100 files, you will have to press 'y' a 100
> times.
> This will probably lead to the habit of using 'rm -f', and/or simply
> pressing y all the time without actually looking at the confirmation
> message.
> In any case, it's not likely to prevent any such accidents.
> 
For the sake of it: You could use rm -I:
quoting the rm man page:
-I  Request confirmation once if more than three files are being
removed or if a directory is being recursively removed.
This is a far less intrusive option than -i yet provides almost
the same level of protection against mistakes.

Output looks like this:
# rm -fI *
remove 10 files?

Would even be better if it would list e.g. 2 or 3 files.

> A better solution would be to write a script that would move files
> instead of deleting them.
> You should name this script to something else than rm, when you're
> working with a new or "foreign" system, you will expect rm to move
> files, instead of deleting them ... and we can all see another
> disaster coming there...

true, sometimes fingers have a memory of their own ;)
> 
> Another hint would be the 'rmstar' option in tcsh, when set, tcsh will
> ask confirmation before executing 'rm *'.
> 
> Note that aliasing 'cp' and 'mv' to 'cp -i' and 'mv -i' is an
> *extremely* wise idea, in the past I have often accidentally overwritten
> files that should not have been overwritten, leading to various
> problems.
> 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: disaster recovery - did I do the right thing?

2007-05-08 Thread Ray
On Monday 07 May 2007 11:16 pm, Ian Smith wrote:

> Ray, I've been watching this thread, and you've had some good advice
> about backups etc, but if you really did 'rm -f *' in /usr/local (NOT
> 'rm -rf *') then it's very likely that you deleted no files at all.


sorry, should have said
rm -rf  *



>
> The only file 'rm -f *' in /usr/local would remove here is a comment I
> made for myself with 'touch moved_portsnap_from_var_db'; 'rm *' (with or
> without -f) does not remove directories (unless you also use -r).
>
> I can't say what was in _your_ /usr/local, but I've just checked on 4.8,
> 4.10, 5.5-STABLE and 6.1-RELEASE systems, and none of them install plain
> files in /usr/local at all, just directories.  So you may be lucky ..

This was a postmortem question, by the time I'd posted, I'd already 
reinstalled from scratch. The machine wasn't in production yet and I had made 
good notes on paper, so It wasn't the end of the world.
Ray

>
> Cheers, Ian
>
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "[EMAIL PROTECTED]"
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: disaster recovery - did I do the right thing?

2007-05-07 Thread Ian Smith
On Sat, 5 May 2007 17:05:42 -0600 Ray <[EMAIL PROTECTED]> wrote:

 > Hello all,
 > I did something stupid the other day (sleep deprivation combined with 
 > a "clever" hack were the main reasons), and I'm just curious if I did the 
 > right thing afterwards.
 > 
 > The mistake:
 > /usr/local/# rm -f *
 > note that root was running bash as a shell at the time, found 
 > in /usr/local/bin or something.
 > 
 > What I did was to start over, reinstall from scratch.
 > my question, was there an easier way?

Ray, I've been watching this thread, and you've had some good advice
about backups etc, but if you really did 'rm -f *' in /usr/local (NOT
'rm -rf *') then it's very likely that you deleted no files at all.

paqi% ll -rt /usr/local
total 134
drwxr-xr-x3 root  wheel512 Feb  9  2006 VFS
-rw-r--r--1 root  wheel  0 Aug 27  2006 moved_portsnap_from_var_db
drwxr-xr-x3 root  wheel512 Dec  3 22:31 src
drwxr-xr-x8 root  wheel512 Dec 10 17:17 www
drwxr-xr-x7 root  wheel512 Dec 10 19:34 libdata
drwxr-xr-x2 root  wheel512 Dec 10 19:52 build-1
drwxr-xr-x9 root  wheel512 Dec 10 21:59 libexec
drwxr-xr-x2 root  wheel512 Dec 10 22:14 env
drwxr-xr-x2 root  wheel   2048 Dec 10 22:53 info
drwxr-xr-x6 root  wheel512 Dec 10 23:23 gnu-autotools
drwxr-xr-x7 root  wheel512 Dec 27 16:33 diablo-jre1.5.0
drwxr-xr-x3 root  wheel  25088 Jan 28 01:36 bin
drwxr-xr-x   83 root  wheel   1536 Feb 11 22:37 share
drwxr-xr-x  139 root  wheel  24064 Feb 12 18:35 include
drwxr-xr-x   33 root  wheel  55296 Feb 12 18:35 lib
drwxr-xr-x   27 root  wheel   1536 Feb 12 18:38 etc
drwxr-xr-x2 root  wheel   1024 Mar  3 20:53 sbin
drwxr-xr-x3 root  wheel512 Mar 29 23:20 portsnap
drwxr-xr-x   28 root  wheel   1024 May  5 04:22 man

The only file 'rm -f *' in /usr/local would remove here is a comment I
made for myself with 'touch moved_portsnap_from_var_db'; 'rm *' (with or
without -f) does not remove directories (unless you also use -r).

I can't say what was in _your_ /usr/local, but I've just checked on 4.8,
4.10, 5.5-STABLE and 6.1-RELEASE systems, and none of them install plain
files in /usr/local at all, just directories.  So you may be lucky .. 

Cheers, Ian

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: disaster recovery - did I do the right thing?

2007-05-07 Thread Jeff Palmer

At 07:05 PM 5/5/2007, Ray wrote:

Hello all,
I did something stupid the other day (sleep deprivation combined with
a "clever" hack were the main reasons), and I'm just curious if I did the
right thing afterwards.

The mistake:
/usr/local/# rm -f *
note that root was running bash as a shell at the time, found
in /usr/local/bin or something.

What I did was to start over, reinstall from scratch.
my question, was there an easier way?
thanks,
Ray



Ray,

Good quality backups are a must.  Even a filesystem snapshot would 
have helped in the above scenario.


http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/snapshots.html
The link above has great info about creating and using filesystem 
snapshots.   If you had one,  you could have just mounted the 
snapshot,  and copied over the files/folders you accidentally removed.


Jeff

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: disaster recovery - did I do the right thing?

2007-05-07 Thread Wojciech Puchar

What I did was to start over, reinstall from scratch.
my question, was there an easier way?


Sure, just restore what you need from those backups you have
so diligently been making --- :-)


the best solution :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: disaster recovery - did I do the right thing?

2007-05-07 Thread Wojciech Puchar


The mistake:
/usr/local/# rm -f *
note that root was running bash as a shell at the time, found
in /usr/local/bin or something.

What I did was to start over, reinstall from scratch.
my question, was there an easier way?


yes.

do

rm -rf /var/db/ports

and then install all needed ports, as base system was untouched
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: disaster recovery - did I do the right thing?

2007-05-05 Thread Ray
On Saturday 05 May 2007 9:23 pm, Martin Tournoij wrote:
> On Sat 05 May 2007 18:05, Garrett Cooper wrote:
> > Martin Tournoij wrote:
> > >On Sat 05 May 2007 17:05, Ray wrote:
> > >>Hello all,
> > >>I did something stupid the other day (sleep deprivation combined with a
> > >> "clever" hack were the main reasons), and I'm just curious if I did
> > >> the right thing afterwards.
> > >>
> > >>The mistake:
> > >>/usr/local/# rm -f *
> > >>note that root was running bash as a shell at the time, found in
> > >> /usr/local/bin or something.
> > >>
> > >>What I did was to start over, reinstall from scratch.
> > >>my question, was there an easier way?
> > >>thanks,
> > >>Ray
> > >
> > >You can use pkg_info -ga to check for missing files in your packages.
> >
> > For (t)csh:
> > alias rm "rm -i"
> >
> > For (ba)sh:
> > alias rm="rm -i"
> >
> > Now that you've learned :).
> >
> > Martin's suggestion is good though -- would have done that considering
> > that all that lived in /usr/local were ports.
> >
> > -Garrett
>

Thanks, I'll keep that in mind, but there had better not be a next time. 
(anybody have a source for one of those nice white jackets with the really 
long sleeves, just in case? ;)   )

> The problem with this is that it will ask confirmation for every file it
> deleted.
> Which is gets pretty annoying after a while, also, if you delete a
> directory containing a 100 files, you will have to press 'y' a 100
> times.
> This will probably lead to the habit of using 'rm -f', and/or simply
> pressing y all the time without actually looking at the confirmation
> message.
> In any case, it's not likely to prevent any such accidents.
>
> A better solution would be to write a script that would move files
> instead of deleting them.
> You should name this script to something else than rm, when you're
> working with a new or "foreign" system, you will expect rm to move
> files, instead of deleting them ... and we can all see another
> disaster coming there...
>
> Another hint would be the 'rmstar' option in tcsh, when set, tcsh will
> ask confirmation before executing 'rm *'.
>
> Note that aliasing 'cp' and 'mv' to 'cp -i' and 'mv -i' is an
> *extremely* wise idea, in the past I have often accidentally overwritten
> files that should not have been overwritten, leading to various
> problems.
>

good ideas, and I may use some of them,
but wouldn't have helped in this case. I _wanted_ to erase all the files in 
this directory (I thought). Due to a softlink and name confusion (a "clever" 
hack) I wasn't in the directory I thought I was.
You live, you learn.
Ray

>-- 
>Regards,
>Martin Tournoij
>___
>freebsd-questions@freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to "[EMAIL PROTECTED]"


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: disaster recovery - did I do the right thing?

2007-05-05 Thread Martin Tournoij
On Sat 05 May 2007 18:05, Garrett Cooper wrote:
> Martin Tournoij wrote:
> >On Sat 05 May 2007 17:05, Ray wrote:
> >>Hello all,
> >>I did something stupid the other day (sleep deprivation combined with a 
> >>"clever" hack were the main reasons), and I'm just curious if I did 
> >>the right thing afterwards.
> >>
> >>The mistake:
> >>/usr/local/# rm -f *
> >>note that root was running bash as a shell at the time, found in 
> >>/usr/local/bin or something.
> >>
> >>What I did was to start over, reinstall from scratch.
> >>my question, was there an easier way?
> >>thanks,
> >>Ray 
> >You can use pkg_info -ga to check for missing files in your packages.
> 
> For (t)csh:
> alias rm "rm -i"
> 
> For (ba)sh:
> alias rm="rm -i"
> 
> Now that you've learned :).
> 
> Martin's suggestion is good though -- would have done that considering that 
> all that lived in /usr/local were ports.
> 
> -Garrett

The problem with this is that it will ask confirmation for every file it
deleted.
Which is gets pretty annoying after a while, also, if you delete a
directory containing a 100 files, you will have to press 'y' a 100
times.
This will probably lead to the habit of using 'rm -f', and/or simply
pressing y all the time without actually looking at the confirmation
message.
In any case, it's not likely to prevent any such accidents.

A better solution would be to write a script that would move files
instead of deleting them.
You should name this script to something else than rm, when you're
working with a new or "foreign" system, you will expect rm to move
files, instead of deleting them ... and we can all see another
disaster coming there...

Another hint would be the 'rmstar' option in tcsh, when set, tcsh will
ask confirmation before executing 'rm *'.

Note that aliasing 'cp' and 'mv' to 'cp -i' and 'mv -i' is an
*extremely* wise idea, in the past I have often accidentally overwritten
files that should not have been overwritten, leading to various
problems.

-- 
Regards,
Martin Tournoij
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: disaster recovery - did I do the right thing?

2007-05-05 Thread George
On Sat, May 05, 2007 at 06:10:36PM -0700, Garrett Cooper wrote:
> Martin Tournoij wrote:
> > On Sat 05 May 2007 17:05, Ray wrote:
> > > The mistake:
> > > /usr/local/# rm -f *
> > > note that root was running bash as a shell at the time, found 
> > > in /usr/local/bin or something.
> > > 
> > > What I did was to start over, reinstall from scratch.  my
> > > question, was there an easier way?
> > 
> > You can use pkg_info -ga to check for missing files in your
> > packages.
> 
> For (t)csh:
> alias rm "rm -i"
> 
> For (ba)sh:
> alias rm="rm -i"

Or for more fun and amusement:

touch -- /usr/local/-i

Unfortunately, the OP explicitly used the -f switch, so the alias
suggestions wouldn't have helped.  

Personally, I'd recommend learning from the mistake (we've all done at
least once) and being more judicious when entering commands,
particularly any 'force' switches, and making regular use of dump(8).
That would avoid circumvent the possibility of developing the unwelcome
habit of typing 'rm -f' to compensate for the increased level of
interaction if aliasing 'rm -i'.  Which may be why the OP got into
trouble.




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: disaster recovery - did I do the right thing?

2007-05-05 Thread Jerry McAllister
On Sat, May 05, 2007 at 05:05:42PM -0600, Ray wrote:

> Hello all,
> I did something stupid the other day (sleep deprivation combined with 
> a "clever" hack were the main reasons), and I'm just curious if I did the 
> right thing afterwards.
> 
> The mistake:
> /usr/local/# rm -f *
> note that root was running bash as a shell at the time, found 
> in /usr/local/bin or something.
> 
> What I did was to start over, reinstall from scratch.
> my question, was there an easier way?

Sure, just restore what you need from those backups you have 
so diligently been making --- :-)

jerry

> thanks,
> Ray 
> 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: disaster recovery - did I do the right thing?

2007-05-05 Thread Garrett Cooper

Martin Tournoij wrote:

On Sat 05 May 2007 17:05, Ray wrote:

Hello all,
I did something stupid the other day (sleep deprivation combined with 
a "clever" hack were the main reasons), and I'm just curious if I did the 
right thing afterwards.


The mistake:
/usr/local/# rm -f *
note that root was running bash as a shell at the time, found 
in /usr/local/bin or something.


What I did was to start over, reinstall from scratch.
my question, was there an easier way?
thanks,
Ray 


You can use pkg_info -ga to check for missing files in your packages.



For (t)csh:
alias rm "rm -i"

For (ba)sh:
alias rm="rm -i"

Now that you've learned :).

Martin's suggestion is good though -- would have done that considering 
that all that lived in /usr/local were ports.


-Garrett
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: disaster recovery - did I do the right thing?

2007-05-05 Thread Martin Tournoij
On Sat 05 May 2007 17:05, Ray wrote:
> Hello all,
> I did something stupid the other day (sleep deprivation combined with 
> a "clever" hack were the main reasons), and I'm just curious if I did the 
> right thing afterwards.
> 
> The mistake:
> /usr/local/# rm -f *
> note that root was running bash as a shell at the time, found 
> in /usr/local/bin or something.
> 
> What I did was to start over, reinstall from scratch.
> my question, was there an easier way?
> thanks,
> Ray 

You can use pkg_info -ga to check for missing files in your packages.

-- 
Regards,
Martin Tournoij
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Disaster recovery.

2006-10-06 Thread Dan Nelson
In the last episode (Oct 06), Grant Peel said:
> Possibly the last few questions.
> 
> 1. After fdisk/disklabel/newfs, how do you drop to the shell (can I
> drop to tcsh?).

In sysinstall, pick Fixit, then CDROM/DVD.  The default shell is
/bin/sh, but since you're on a livecd, you can switch to tcsh.
 
> 2. Once in that shell, are all shell commands avialable? (or at least
> mount, cp, restore, etc).

Yep.  You can also do this stuff with just boot floppies, but in this
case, you'll just get the bare minimum commands (ifconfig, mount,
restore).
 
> 3. If the old disk is 36 GIG and the new disk is 74 GIG, AND I
> partition every filesystem bigger than the old ones on the old disk,
> then do the restore of the 4 filesystems, will it work or do the new
> filesystems really need to be exactly the same size?

Restore is file-based, so it can restore onto anything.  You can even
go from a split root/var/usr system to an all-in-one-fs setup and back.
 
> 4. All my servers are capable of pxe boot. Would it be worth while
> adding a disk to a server with nothing else than a fresh virgin
> install of freebsd (I have 0 exp with pxe, so if I am off here
> forgive me).

If nothing else, pxe's fun to play with.  I've mainly just used it to
serve up pxegrub so I can boot a system where I accidentally blew away
the bootblocks or cleared the active flag on all my fdisk partitions.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Disaster recovery.

2006-10-06 Thread Grant Peel

BINGO!

Thanks Dan, I think that is exactly what I am looking for.

Possibly the last few questions.

1. After fdisk/disklabel/newfs, how do you drop to the shell (can I drop to 
tcsh?).


2. Once in that shell, are all shell commands avialable? (or at least mount, 
cp, restore, etc).


3. If the old disk is 36 GIG and the new disk is 74 GIG, AND I partition 
every filesystem bigger than the old ones on the old disk, then do the 
restore of the 4 filesystems, will it work or do the new filesystems really 
need to be exactly the same size?


4. All my servers are capable of pxe boot. Would it be worth while adding a 
disk to a server with nothing else than a fresh virgin install of freebsd (I 
have 0 exp with pxe, so if I am off here forgive me).


Thanks for the help thus far.
-Grant

- Original Message - 
From: "Dan Nelson" <[EMAIL PROTECTED]>

To: "Grant Peel" <[EMAIL PROTECTED]>
Cc: "Peter A. Giessel" <[EMAIL PROTECTED]>; "freeBSD" 


Sent: Friday, October 06, 2006 12:36 PM
Subject: Re: Disaster recovery.



In the last episode (Oct 06), Grant Peel said:

Is it possible to boot the machine using a 'live' freebsd silesystem
via cd? Then setup the /mnt , setup the new filesystems, then use
restore to briung the real data to the disk?

I guess my question really should have been, if you install a new
disk, or re newfs a disk, how do you start the machine, a freebsd
boot disk? (without installing freebsd to the machine that the
restore are going to overwrite anyway!).


A livecd (freesbie, or the FreeBSD install disc 1) will suffice.  I
usually use sysinstall to fdisk/disklabel/newfs, then drop to the shell
to run ifconfig, nfs mount the server with my dumps, and  restore.

--
Dan Nelson
[EMAIL PROTECTED]





___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Disaster recovery.

2006-10-06 Thread P.U.Kruppa

On Fri, 6 Oct 2006, Grant Peel wrote:

Is it possible to boot the machine using a 'live' freebsd silesystem via cd? 
Then setup the /mnt , setup the new filesystems, then use restore to briung 
the real data to the disk?



I guess my question really should have been, if you install a new disk, or re 
newfs a disk, how do you start the machine, a freebsd boot disk?
(without installing freebsd to the machine that the restore are going to 
overwrite anyway!).
I am afraid you really have to describe your situation more 
precisely.


From what I gather you seem to have a broken server and want to 

rescue some files from it to a freshly setup one.

If this is the case, I would take a screw driver, fetch the hard 
disk from the old box, plug it into the new one and mount it 
somewhere on your new filesystem.


Or I got it all wrong, in this case please do excuse my 
interference.


Regards,

Uli.



-Grant



- Original Message - From: "Peter A. Giessel" <[EMAIL PROTECTED]>
To: "Grant Peel" <[EMAIL PROTECTED]>
Cc: "freeBSD" 
Sent: Friday, October 06, 2006 11:47 AM
Subject: Re: Disaster recovery.



On 2006/10/06 5:34, Grant Peel seems to have typed:

so the question is ... if I have the dumps on one machine, and I just
installed a new hard drive on another, in a nutshell, what are the steps 
to
restore the failed server. Can I use the FreeBSD 'live' filesystem? Is 
ther

a step by step (that I have not found) in the handbook somewhere?


Honestly, the man pages are your friend in these situations, especially
the restore man page:
http://www.freebsd.org/cgi/man.cgi?query=restore&apropos=0&sektion=0&manpath=FreeBSD+6.1-RELEASE&format=html

See the "-r" flag especially, which includes a brief example.  If you
are restoring from another machine, things get a bit more interesting
though, which is why I always like to keep around a Freesbie disk.
http://www.freesbie.org/
Its nice to have a full OS on a CD available for use.





___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"





Peter Ulrich Kruppa
Wuppertal
Germany

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Disaster recovery.

2006-10-06 Thread Peter A. Giessel

On 2006/10/06 8:28, Grant Peel seems to have typed:
> Is it possible to boot the machine using a 'live' freebsd silesystem via cd? 
> Then setup the /mnt , setup the new filesystems, then use restore to briung 
> the real data to the disk?
>
> - Original Message - 
> From: "Peter A. Giessel" <[EMAIL PROTECTED]>
> To: "Grant Peel" <[EMAIL PROTECTED]>
> Cc: "freeBSD" 
> Sent: Friday, October 06, 2006 11:47 AM
> Subject: Re: Disaster recovery.
>>
>> http://www.freesbie.org/


Yes, see FreeSBIE.  Its a great 'live' freebsd CD.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Disaster recovery.

2006-10-06 Thread Dan Nelson
In the last episode (Oct 06), Grant Peel said:
> Is it possible to boot the machine using a 'live' freebsd silesystem
> via cd? Then setup the /mnt , setup the new filesystems, then use
> restore to briung the real data to the disk?
> 
> I guess my question really should have been, if you install a new
> disk, or re newfs a disk, how do you start the machine, a freebsd
> boot disk? (without installing freebsd to the machine that the
> restore are going to overwrite anyway!).

A livecd (freesbie, or the FreeBSD install disc 1) will suffice.  I
usually use sysinstall to fdisk/disklabel/newfs, then drop to the shell
to run ifconfig, nfs mount the server with my dumps, and  restore.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Disaster recovery.

2006-10-06 Thread Grant Peel
Is it possible to boot the machine using a 'live' freebsd silesystem via cd? 
Then setup the /mnt , setup the new filesystems, then use restore to briung 
the real data to the disk?



I guess my question really should have been, if you install a new disk, or 
re newfs a disk, how do you start the machine, a freebsd boot disk?
(without installing freebsd to the machine that the restore are going to 
overwrite anyway!).


-Grant



- Original Message - 
From: "Peter A. Giessel" <[EMAIL PROTECTED]>

To: "Grant Peel" <[EMAIL PROTECTED]>
Cc: "freeBSD" 
Sent: Friday, October 06, 2006 11:47 AM
Subject: Re: Disaster recovery.



On 2006/10/06 5:34, Grant Peel seems to have typed:

so the question is ... if I have the dumps on one machine, and I just
installed a new hard drive on another, in a nutshell, what are the steps 
to
restore the failed server. Can I use the FreeBSD 'live' filesystem? Is 
ther

a step by step (that I have not found) in the handbook somewhere?


Honestly, the man pages are your friend in these situations, especially
the restore man page:
http://www.freebsd.org/cgi/man.cgi?query=restore&apropos=0&sektion=0&manpath=FreeBSD+6.1-RELEASE&format=html

See the "-r" flag especially, which includes a brief example.  If you
are restoring from another machine, things get a bit more interesting
though, which is why I always like to keep around a Freesbie disk.
http://www.freesbie.org/
Its nice to have a full OS on a CD available for use.





___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Disaster recovery.

2006-10-06 Thread Peter A. Giessel
On 2006/10/06 5:34, Grant Peel seems to have typed:
> so the question is ... if I have the dumps on one machine, and I just 
> installed a new hard drive on another, in a nutshell, what are the steps to
> restore the failed server. Can I use the FreeBSD 'live' filesystem? Is ther 
> a step by step (that I have not found) in the handbook somewhere?

Honestly, the man pages are your friend in these situations, especially
the restore man page:
http://www.freebsd.org/cgi/man.cgi?query=restore&apropos=0&sektion=0&manpath=FreeBSD+6.1-RELEASE&format=html

See the "-r" flag especially, which includes a brief example.  If you
are restoring from another machine, things get a bit more interesting
though, which is why I always like to keep around a Freesbie disk.
http://www.freesbie.org/
Its nice to have a full OS on a CD available for use.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Disaster recovery.

2006-10-06 Thread Alex Zbyslaw

Grant Peel wrote:


Hi all,

I currently keep file dumps of all filesystems on our servers on a 
secure raid 5 box, lees of course, the proc and swap dir.


These dumps look like this and are done and transfered to a NFS 
filesystem in the /mnt/ dir.


server1-usr-full-dump
server1-home-full-dump
server1-var-full-dump
server1-root-full-dump

So I have (all, I hope!) everything I need to rebuild a server should 
the hard disk completely crap out, or some script overwrites or rm's 
everything.


I have never been in the position that this, ( a complete hard drive 
), had to be done.


so the question is ... if I have the dumps on one machine, and I just 
installed a new hard drive on another, in a nutshell, what are the 
steps to
restore the failed server. Can I use the FreeBSD 'live' filesystem? Is 
ther a step by step (that I have not found) in the handbook somewhere?


Don't know that it's described anywhere, but in short below.  You can 
try it on a live server, don't actually do any newfs or restores!


Boot FreeBSD CD1 (pretty much any recent version ought to do unless 
there were changes to dump or fliesystem format).  E.g. a 5.4 CD ought 
to restore a 6.2 machine just fine.


Newfs/bsdlabel/fdisk stuff probably from post install configuration, so 
that you don't install any packages etc.  This is where you need a paper 
record of your disk slicing/partitioning.


Fixit shell and mount remote-partition-of-dumps using NFS on /mnt.  This 
may need some kldloads.  I've gotten stuff accessible via SAMBA like 
this so NFS ought to work.  Needed to phutz with the load path for kldload.


Mount fresh e.g. / partitions on e.g. /mnt2 .  I'm pretty sure you can 
make new mount points as boot CD mounts root on a memory disk.


restore -f /mnt/server1-root-full-dump -root  (check man page!)

Unmount /mnt and repeat for usr, home, var etc.


Note that you can gzip your backups and use a restore command like: 
gzcat /mnt/server1-root-full-dump -root.gz | restore -f - -r


Dumps take longer but take up less space.  I do the same thing and also 
have incrementals.  Always relied on figuring out what to do as I went 
along if I ever needed to, hence the somewhat sparse nature of the above 
procedure :-)


--Alex


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Disaster recovery ?

2005-08-30 Thread Ted Mittelstaedt


>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] Behalf Of
>Madhusudan Singh
>Sent: Tuesday, August 30, 2005 8:09 AM
>To: freebsd-questions@freebsd.org
>Subject: Disaster recovery ?
>
>
>Hi
>
>I had a working FreeBSd 5.3 RELEASE server running postfix and
>zope until
>last night. When I checked it in the morning, it had a bunch of "ad4 ...
>UNRECOVERABLE ERROR" messages on it. Upon a reboot, it
>complains it cannot
>find /boot/loader (error 16). Last week, it had shut down without any
>apparent reason but came up upon reboot. Sounds like the hard disk is
>fried. Its a new server (just 5 months old or so).
>
>How do I recover what was on the partitions ?

You don't   With the price of UDMA disks and the price of hardware IDE
raid
controllers as cheap as they are, anyone setting up a production server
on a
single IDE disk is taking a totally unnecessary and stupid gamble.

Consider it a learning experience.  We have all had it happen to us at
least
once.  You probably needed to update your install anyhow.

Ted
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.17/85 - Release Date: 8/30/2005

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Disaster recovery ?

2005-08-30 Thread Charles Swiger

On Aug 30, 2005, at 11:08 AM, Madhusudan Singh wrote:
I had a working FreeBSd 5.3 RELEASE server running postfix and zope  
until
last night. When I checked it in the morning, it had a bunch of  
"ad4 ...
UNRECOVERABLE ERROR" messages on it. Upon a reboot, it complains it  
cannot

find /boot/loader (error 16). Last week, it had shut down without any
apparent reason but came up upon reboot. Sounds like the hard disk is
fried. Its a new server (just 5 months old or so).

How do I recover what was on the partitions ?


You can try getting a new disk and using dd with the ignore error  
flag, and see how much data you can get back.  You can also pay  
somewhere between $200 and $2000 for a professional data recovery  
company to try to revive the missing data...


--
-Chuck


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Disaster recovery planning

2003-06-24 Thread Matthew Seaman
On Tue, Jun 24, 2003 at 09:12:14PM +1000, Sue Blake wrote:
> Here's how I plan to recover a system from a level 0 backup to
> new hardware, if ever the need arises:
> 
> 1. boot off installation CD (or floppy??)
> 2.   disklabel, make filesystems (using sysinstall)
> 3.   restore root filesystem and mount it
> 4.   change fstab and various configs to work with new hardware
> 5. boot in single user mode, fix fstab and devices, restore other filesystems
> 6. boot multiuser and fix anything that still doesn't work
> 
> I'm upgrading using cvsup and don't have recent CDs.
> I know I can make my own bootable CD to keep for this purpose, but I
> don't want to rely on it being found in a crisis if there is a more
> generic method.
> 
> Can I do this by booting off an _old_ FreeBSD CD? How old, I mean,
> what sort of changes do I need to look out for?
> 
> I think I need the fixit CD too, I couldn't just use the holographic
> shell even if feeling masochistic... or could I?
> 
> Could it be done just using a couple of quickly downloaded boot
> floppy images, in which case I'd only need to document the URL for
> the current floppies?

Refreshing to see someone thinking about these sort of things well
before the disaster actually happens.

I think that so long as you've got access to installation media for
the same major version as the system you're trying to recover and that
you can access a) your backup media and b) your hard drive from
eg. the system booted from the live filesystem CD, then you're
covered.  In fact, it's clearly going to be a good idea to restore the
data to your hard drive without having to have the system booted from
that drive.  Pulling the disk from the machine to be recovered and
temporarily mounting it in another system is an alternative.

You need the same major OS version because of things like the new UFS2
support in 5.x --- although you could partition a drive, build
filesystems and recover the 5.x data from backup using 4.x install
media, you'ld have to create UFS filesystems.

I can't remember off-hand exactly what commands are available on the
install floppies -- I think you get dump(8) and restore(8), but not
tar(1).  Booting from the live filesystem CD gets you all the usual
suspects.

If you are using a backup software package not included in the
standard FreeBSD installation, then you've got to keep an installable
copy of that software with your backup media -- after all, the backups
are pointless if you can't recover the data from them.  You could even
go as far as creating your own customized install CD, which builds the
filesystems etc. and runs the recovery program: depends just how much
effort you want to put into something you hope you'll never have to
use for real.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgp0.pgp
Description: PGP signature


Re: Disaster recovery planning

2003-06-24 Thread pippo
At 09:12 PM 6/24/2003 +1000, you wrote:
Here's how I plan to recover a system from a level 0 backup to
new hardware, if ever the need arises:
1. boot off installation CD (or floppy??)
2.   disklabel, make filesystems (using sysinstall)
3.   restore root filesystem and mount it
4.   change fstab and various configs to work with new hardware
5. boot in single user mode, fix fstab and devices, restore other filesystems
6. boot multiuser and fix anything that still doesn't work
I'm upgrading using cvsup and don't have recent CDs.
I know I can make my own bootable CD to keep for this purpose, but I
don't want to rely on it being found in a crisis if there is a more
generic method.
Can I do this by booting off an _old_ FreeBSD CD? How old, I mean,
what sort of changes do I need to look out for?
I think I need the fixit CD too, I couldn't just use the holographic
shell even if feeling masochistic... or could I?
Could it be done just using a couple of quickly downloaded boot
floppy images, in which case I'd only need to document the URL for
the current floppies?
I seem to be in the unfortunate situation you fear and cannot find a 
suitable solution.
I had to change the hardware but I can still boot up - however, I can only 
boot up with a 4.5 Generic kernel; the 4.8 SMP kernel freezes and I do not 
have a 4.8 generic kernel on the machine (I don't know why, I do on another 
machine).
I believe I only need to reconfigure and compile a new kernel, but for the 
life of me I cannot figure out how to go about this. I am not sure if I 
could reconfigure an appropriate kernel if I boot with the 4.5 generic. 
kWill that create a new kernel in version 4.5? And then, would I have to 
re-upgrade to 4.8 and rebuild the world?

The simples would seem to be to boot with a 4.8 generic kernel, tkhen build 
a new kernel. But how?
I'm not sure how booting from a floppy would work, especially since FreeBSD 
is set up on scsi (on a dual boot machine, XP is on another SCSI disk).
Network is also inacessible as the ethernet card has been changed.
Things are more complicated yet, as the new system is on an MSI 875P 
motherboard with on-board Gigabit ethernet and serial ata; they are not 
listed under hardware compatibility.

Any help is appreciated.

Pippo

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Disaster recovery planning

2003-06-24 Thread Stephen Hovey

I keep a local copy ftpable of the version(s) I use..  Install just the
bin dist using floppy and the local ftpable - then full restore from tape
- and recompile the kernal just to be on the safe side.

On Tue, 24 Jun 2003, Sue Blake wrote:

> Here's how I plan to recover a system from a level 0 backup to
> new hardware, if ever the need arises:
> 
> 1. boot off installation CD (or floppy??)
> 2.   disklabel, make filesystems (using sysinstall)
> 3.   restore root filesystem and mount it
> 4.   change fstab and various configs to work with new hardware
> 5. boot in single user mode, fix fstab and devices, restore other filesystems
> 6. boot multiuser and fix anything that still doesn't work
> 
> I'm upgrading using cvsup and don't have recent CDs.
> I know I can make my own bootable CD to keep for this purpose, but I
> don't want to rely on it being found in a crisis if there is a more
> generic method.
> 
> Can I do this by booting off an _old_ FreeBSD CD? How old, I mean,
> what sort of changes do I need to look out for?
> 
> I think I need the fixit CD too, I couldn't just use the holographic
> shell even if feeling masochistic... or could I?
> 
> Could it be done just using a couple of quickly downloaded boot
> floppy images, in which case I'd only need to document the URL for
> the current floppies?
> 
> 
> 
> -- 
> 
> Regards,
> -*Sue*-
> 
>  
>  
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"