Re: tar question from newbie
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. Aaarghhhhh!!!!!!!!!!
>
> 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 debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: