Re: recovering a single directory from a tar archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Marvin Blackburn" <mblackburn@xxxxxxxxxxxxx>
> 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@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux