Re: tar question from newbie

2002-06-18 Thread Dave Carrigan
On Mon, 2002-06-17 at 19:23, Abner Gershon wrote:

 This is very frustrating. I have 3 Linux books that I
 have consulted as well as the man page and I can't
 figure out how to use tar to back up my /home
 directory from where it resides on /dev/hdd to my
 other hard drive /dev/hdb7. 

Other people have told you how to fix the tar command. One other thing
that you may want to consider is a different tool than tar if you plan
to regularly backup your home directory to another disk. I'm personally
fond of faubackup, which can do incremental backups, and still maintain
a mirror of your original directory. Just run it once a day:

  faubackup /home/abner /mnt/abner

-- 
Dave Carrigan
Seattle, WA, USA
[EMAIL PROTECTED] | http://www.rudedog.org/ | ICQ:161669680
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-C++-DNS-PalmOS-PostgreSQL-MySQL


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



tar question from newbie

2002-06-17 Thread Abner Gershon
This is very frustrating. I have 3 Linux books that I
have consulted as well as the man page and I can't
figure out how to use tar to back up my /home
directory from where it resides on /dev/hdd to my
other hard drive /dev/hdb7. 

I accidentaly ran fsck today without making the file
system read only which I later read was a no no and I
am wondering if this may have lead to a problem. I
never received any message that any of the files were
damaged though.

Anyway I change to my home directory, cd /home. Then
type tar -cf /mnt/abner (I previously mounted
/dev/hdb7 to /mnt)

Then I get the error message,tar: Cowardly refusing
to create and empty archive. I fooled around for a
couple of hours with different sources and
destinations for tar file but always got the same
error message. Aaargh!!

By the way I am logged on as root if this helps.

I desperately await your replies. Thanks.

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: tar question from newbie

2002-06-17 Thread Chris Kenrick
On Mon, Jun 17, 2002 at 07:23:00PM -0700, Abner Gershon wrote:
 This is very frustrating. I have 3 Linux books that I
 have consulted as well as the man page and I can't
 figure out how to use tar to back up my /home
 directory from where it resides on /dev/hdd to my
 other hard drive /dev/hdb7. 
 
 I accidentaly ran fsck today without making the file
 system read only which I later read was a no no and I
 am wondering if this may have lead to a problem. I
 never received any message that any of the files were
 damaged though.
 
 Anyway I change to my home directory, cd /home. Then
 type tar -cf /mnt/abner (I previously mounted
 /dev/hdb7 to /mnt)
 
 Then I get the error message,tar: Cowardly refusing
 to create and empty archive. I fooled around for a
 couple of hours with different sources and
 destinations for tar file but always got the same
 error message. Aaargh!!
 
 By the way I am logged on as root if this helps.
 
 I desperately await your replies. Thanks.

Presuming you just want to create the tar file as abner.tar in the root
directory of the /dev/hdb7 partition...

tar -cf /mnt/abner.tar /home

should do the job.  If you want to compress the tar file to save space,
add -z to the switches.  Note that this will tar the directories and
files as home/dir1, home/dir2/file1, and so on.  If that's not quite
what you want, then it can be tweaked a little bit.  Of course, the
above assumes that /dev/hdb7 is mounted at the time...

- Chris  


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: tar question from newbie

2002-06-17 Thread Nick Hastings
Hi,

* Abner Gershon [EMAIL PROTECTED] [020618 12:23]:
snip
 Anyway I change to my home directory, cd /home. Then
 type tar -cf /mnt/abner (I previously mounted
 /dev/hdb7 to /mnt)

The argumen tafter the f needs to be the distination file.

eg.

tar -cf /mnt/abner.tar abner
   ^^^
|
To indicate it is a tar file
 
 Then I get the error message,tar: Cowardly refusing
 to create and empty archive. I fooled around for a
 couple of hours with different sources and
 destinations for tar file but always got the same
 error message. Aaargh!!

It's 'cause tar wanted two areguments (ie. it did not know what to tar)
 
 By the way I am logged on as root if this helps.
 
 I desperately await your replies. Thanks.

HTH,

Nick.

PS. you can compress the archive with a command like

tar -czf /mnt/abner.tgz abner
^^^
 |
 This is a convention for showing its tared and gziped

-- 
Debian 3.0
Linux onefish 2.4.18-lavienx #1 Thu Jun 13 19:04:39 EST 2002 i686 unknown


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: tar question from newbie

2002-06-17 Thread Patrick Wiseman
On Mon, 17 Jun 2002, Abner Gershon wrote:

 This is very frustrating. I have 3 Linux books that I have consulted
 as well as the man page and I can't figure out how to use tar to back
 up my /home directory from where it resides on /dev/hdd to my other
 hard drive /dev/hdb7.
 
 I accidentaly ran fsck today without making the file system read only
 which I later read was a no no and I am wondering if this may have
 lead to a problem. I never received any message that any of the files
 were damaged though.

The past participle of the verb to lead is led, not lead.  Sorry,
but that's a peeve of mine.  I hope you'll forgive me for being so
pedantic, given what comes next :)

 Anyway I change to my home directory, cd /home. Then type tar -cf
 /mnt/abner (I previously mounted /dev/hdb7 to /mnt)

Here's my favorite magic tar command:

tar cf - dir1 | (cd dir2; tar xvf - )

It copies dir1 to dir2, preserving everything, including symbolic
links.  The - in the first half sends everything to STDIN; the - in
the second half accepts input from STDOUT.  And, because it uses stdin and
stdout, it doesn't require disk space to work.

In your case, from the / directory, replace dir1 with /home, dir2 with
/mnt/abner.  You might want to run it with 'tar tvf -' on the right side
of the pipe first, just to see what it's going to do.  The v in the
xvf on the right side is unnecessary - I just like to see what's going
on.

This comes, by the way, from _The Underground Guide to Unix_, by John
Montgomery (Addison-Wesley 1994).  I recommend it.  I just checked Amazon,
and it's available at

http://www.amazon.com/exec/obidos/ASIN/0201406535/qid%3D1024368156/ref%3Dsr%5F11%5F0%5F1/102-2544833-3769763

Patrick

-- 
Patrick Wiseman
[EMAIL PROTECTED]
Linux user #17943


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]