  | |  | recovering a single directory from a tar archive | recovering a single directory from a tar archive 2004-02-19 - By Will Mc Donald
Back From: "Marvin Blackburn " <mblackburn@(protected) >
> I have a single rhel 2.1 es systems that has an attached tape drive.
> I need a good way to back it up, and I was thinking tar would work.
> However, I often have to recover directories and there are too many files to
> list individually.
> Is there an easy way to get a particular directory.
>
> Or is there another mechanism for backing up that would alleviate this
> problem. I have considered amanda; however it seems to be a bit of overkill
> just for one system.
http://lists.debian.org/debian-user/2001/debian-user-200101/msg04040.html
Assuming $archive is your tarfile or tape device and $filename is the file you want you can just do...
$ tar tvf $archive
... for a file listing. Then to extract one file just do...
$ tar xvf $archive $filename
Add the 'z ' option as required if your archive 's compressed. Your other alternative would be to use dump/restore. Then do a...
$ restore -ivf
And you could 'cd ' down into the appropriate place, 'add ' the required files the 'extract '.
Will.
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@(protected)?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
|
|
 |