I've deleted /home - is there anything that can be done..

I've deleted /home - is there anything that can be done..

Post by -=-peas-= » Wed, 17 Jan 2001 04:55:51



Call me stupid if you will but i have gone deleted /home. I understand that
there is no way of recovering the files but how do i re-create /home itself
?

Is it as simple as:

cd /
mkdir /home

(Or was that suggestion even more stupid ?)

regards,
-=-peas-=-

 
 
 

I've deleted /home - is there anything that can be done..

Post by acr.. » Tue, 16 Jan 2001 23:17:50




Quote:> Call me stupid if you will but i have gone deleted /home. I understand
that
> there is no way of recovering the files but how do i re-create /home
itself
> ?

> Is it as simple as:

> cd /
> mkdir /home

> (Or was that suggestion even more stupid ?)

> regards,
> -=-peas-=-

Usually the /home filesystem is under usr. So you'd want to make the
home directory in /usr as /usr/home. Then make a symbolic link to
/usr/home in /.

If you specifically created your /home filesystem under /, then you can
put it there again.

Andy

Sent via Deja.com
http://www.deja.com/

 
 
 

I've deleted /home - is there anything that can be done..

Post by -=-peas-= » Wed, 17 Jan 2001 10:23:44


Thanx for your help.

-=-peas-=-

 
 
 

I've deleted /home - is there anything that can be done..

Post by Dave Simo » Thu, 18 Jan 2001 00:43:56


We've tracked down the source of the following rumour to



>> Call me stupid if you will but i have gone deleted /home. I
>> understand
>that
>> there is no way of recovering the files but how do i
>> re-create /home
>itself
>> ?

>> Is it as simple as:

>> cd /
>> mkdir /home

>> (Or was that suggestion even more stupid ?)

>> regards,
>> -=-peas-=-

>Usually the /home filesystem is under usr. So you'd want to
>make the home directory in /usr as /usr/home. Then make a
>symbolic link to /usr/home in /.

What makes you believe it's usually under /usr? There can be
clear advantages of having it on a separate partition (like
sharing it between OS's or making it upgrade-proof) in which
case why bother linking.

As for the original posting, that's the eternal danger of rm -R.
But you should be able to concoct a simple script that
intercepts the -R and makes you think twice about it. Come to
think of it, why don't I do that myself ?? :^\

Dave

- Show quoted text -

Quote:>If you specifically created your /home filesystem under /,
>then you can put it there again.

>Andy

>Sent via Deja.com
>http://www.deja.com/

 
 
 

I've deleted /home - is there anything that can be done..

Post by Chris Costell » Thu, 18 Jan 2001 13:06:28



> What makes you believe it's usually under /usr? There can be
> clear advantages of having it on a separate partition (like
> sharing it between OS's or making it upgrade-proof) in which
> case why bother linking.

   That (/usr/home) is the default configuration in FreeBSD, and it
seems to be prevalent from what I can tell.


 
 
 

I've deleted /home - is there anything that can be done..

Post by Donn Mille » Thu, 18 Jan 2001 16:55:09



> As for the original posting, that's the eternal danger of rm -R.
> But you should be able to concoct a simple script that
> intercepts the -R and makes you think twice about it. Come to
> think of it, why don't I do that myself ?? :^\

On a filesystem separate from /home:

tar cpvf - /home/* | gzip -c > home.tar.gz

A good idea would be to do a weekly or daily backup, include the date in
the name of the tar file, and burn it onto a CD or copy to tape.  In
case something happens, you'll be able to pick from a range of dates.
For example:

home-Wed Jan 17 02:53:03 EST 2001.tar.gz

tar cpvf - /home/* | gzip -c > "home-`date`.tar.gz"

Of course, you might want to format the args to the date command.  But,
I don't see the problem in keeping the spaces in there from the date
command.  It just looks like something 'Doze would do, that's all. ;)

-Donn

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

 
 
 

I've deleted /home - is there anything that can be done..

Post by Dave Simo » Thu, 18 Jan 2001 20:25:59


We've tracked down the source of the following rumour to

04:06:28 GMT :



>> What makes you believe it's usually under /usr? <snip>
>   That (/usr/home) is the default configuration in FreeBSD,
>   and it seems to be prevalent from what I can tell.

>                              - Chris Costello

        Well strike me down! Nonetheless I think I'll be sticking
with /home and keeping /usr for the purpose for which it was
intended.
        By the way, why is it called /usr? I can't believe the Unix
creators were lazy enough to want to save one letter when typing
"user" - apart from which I don't see any particular synergy
between the user and his /usr directory. I'll take a guess at
"Unix software repository." Anyone know the truth?

Dave

"Keeping usrs homeless for over 5 years now!"

 
 
 

I've deleted /home - is there anything that can be done..

Post by Tore Lun » Thu, 18 Jan 2001 21:33:30



>         By the way, why is it called /usr? I can't believe the Unix
> creators were lazy enough to want to save one letter when typing
> "user" -

Oh, they were lazy enough for sure, as when they made creat() e.g.

Quote:> apart from which I don't see any particular synergy
> between the user and his /usr directory. I'll take a guess at
> "Unix software repository." Anyone know the truth?

Unix System Resources.
--
    Tore
 
 
 

I've deleted /home - is there anything that can be done..

Post by Don » Fri, 19 Jan 2001 05:11:17


here's a simple shell script that i wrote to backup certain files and
directories, and to ftp them to another host for safe keeping, as well as
keeping a local copy.  make sure you have a .netrc file in the /root
directory with the login info so that the script can automatically login and
transfer the files.  it's not much, but it's better than loosing your home
directory.

the backup.sh script is as follows:

#!/bin/sh

DATE=`/bin/date +%d-%b-%Y`

echo "~~~BEGINNING BACKUP OF YOUR.DOMAIN.COM~~~"
echo "===> COMPRESSING FILES AND FOLDERS"

tar -cpszf httpd.bak.tar.gz /home/httpd
tar -cpszf httpdconf.bak.tar.gz /etc/httpd
tar -cpszf named.bak.tar.gz /var/named
tar -cpszf mailconf.bak.tar.gz /etc/mail
tar -cpszf firewall.bak.tar.gz /etc/rc.d/rc.firewall
tar -cpszf mailspool.bak.tar.gz /var/spool/mail
tar -cpszf sendmailcf.bak.tar.gz /etc/sendmail.cf

echo "=====> CREATING DIRECTORY"

mkdir /home/backups/ns1_$DATE

echo "=======> MOVING FILES AND FOLDERS TO DIRECTORY"

mv -f *.bak.tar.gz /home/backups/ns1_$DATE

echo "=========> COMPRESSING DIRECTORY"

tar -cpszf ns1_$DATE.tar.gz /home/backups/ns1_$DATE

echo "===========> SENDING DIRECTORY TO BACKUP SERVER"

ftp <<**
open YOUR.FTPHOST.COM
bin
put ns1_$DATE.tar.gz  /backups/ns1_$DATE.tar.gz
bye
**

echo "=============>REMOVING COMPRESSED DIRECTORY"

rm ns1_$DATE.tar.gz

echo "~~~BACKUP COMPLETE~~~"

and the format of the .netrc is as follows:

machine YOUR.FTPHOST.COM
login USERNAME
password PASS



> > As for the original posting, that's the eternal danger of rm -R.
> > But you should be able to concoct a simple script that
> > intercepts the -R and makes you think twice about it. Come to
> > think of it, why don't I do that myself ?? :^\

> On a filesystem separate from /home:

> tar cpvf - /home/* | gzip -c > home.tar.gz

> A good idea would be to do a weekly or daily backup, include the date in
> the name of the tar file, and burn it onto a CD or copy to tape.  In
> case something happens, you'll be able to pick from a range of dates.
> For example:

> home-Wed Jan 17 02:53:03 EST 2001.tar.gz

> tar cpvf - /home/* | gzip -c > "home-`date`.tar.gz"

> Of course, you might want to format the args to the date command.  But,
> I don't see the problem in keeping the spaces in there from the date
> command.  It just looks like something 'Doze would do, that's all. ;)

> -Donn

> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

 
 
 

I've deleted /home - is there anything that can be done..

Post by -=-peas-= » Sat, 20 Jan 2001 04:55:20



Quote:> here's a simple shell script that i wrote to backup certain files and
> directories, and to ftp them to another host for safe keeping,

nice one, thanx for your time.

-=-peas-=-

 
 
 

I've deleted /home - is there anything that can be done..

Post by Daniel Rud » Fri, 26 Jan 2001 03:24:06




> > What makes you believe it's usually under /usr? There can be
> > clear advantages of having it on a separate partition (like
> > sharing it between OS's or making it upgrade-proof) in which
> > case why bother linking.

>    That (/usr/home) is the default configuration in FreeBSD, and it
> seems to be prevalent from what I can tell.



I have /home on a partition far removed from /usr (On a different
harddisk actually).  Quite frankly, the rm -R is a big freaking problem
especially as root...no ARE YOU SURE?! to give you brain a chance to
come down off the its walk.  Taking out a directory as a regular user is
hard if not impossiable to do while being root you can destroy the
system with ease.  Kinda reminds me of the some jokes that I heard
awhile back about a new sysadmin irrevoerably damaging a unix
installation in less than 10 keystrokes.  But I've done stupid things
myself like an rm * in the /etc directory...so I can't say anything.
--
Daniel Rudy

Remove "0123456789." and ".invalid" to reply.
Please reply to dcrudy at aol dot com.

 
 
 

1. I've read/am reading the faq's - but what is a Segmentation fault?

I am reading the faq's as fast as I can, but I would really appreciate a
pointer to information about Segmentation faults.  Every time I try to run
Pico (among others) the system responds with "Segmentation fault".  What
does it mean?  How can i fix it?  Is it in a FAQ?  Which one?

THANKS!!!
Dana
----------



----------
--
------------------------------------------------------------------------------
 \ The above does not represent OIT, UNC-CH, laUNChpad, or its other users. /
   ------------------------------------------------------------------------

2. Has anyone tried FreeBSD on Inspiron 4000?

3. Dual Homed Linux - what am I doing wrong?

4. How to increase inodes on SCO system?

5. I am wodering if there is anything to read joliet CD's out there

6. Q:pls tell me what's wrong-->socket

7. Help, I've fallen and am accused of hacking!

8. "File system is full"

9. How do I get 'w' to say that i am doing something else

10. What am I doing wrong with 'chat'?

11. Can't find /dev/nst0....What am I doing wrong?

12. What am I doing wrong here (UNIX-domain sockets don't work)?

13. USYNC_PROCESS - what's am I doing wrong