Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!news-peer.sprintlink.net!news.sprintlink.net!sprint!uunet!in1.uu.net!208.195.156.10!news.walltech.com!samba.rahul.net!rahul.net!a2i!fmc.a2i!fmc From: Frank McConnell <fmc@rahul.net> Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: using 'restore' to restore one file Date: 19 Apr 1997 02:11:14 GMT Organization: File under Psychedelia Lines: 29 Message-ID: <5j99k2$7li@samba.rahul.net> References: <3357eae0.0@news.interbahn.net> NNTP-Posting-Host: waltz.rahul.net NNTP-Posting-User: fmc Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:39307 pete helme <pete@ebay.com> wrote: >I know this is a silly question, but I want to make sure "restore" will do >what I think it's supposed to do before I try it and end up deleteing the >wrong files. Can 'restore' restore as little as one file or only a whole >directory? Yes, you can use restore to restore single files. I usually do this interactively, e.g. "restore ivf /dev/rst0" then use the interactive command prompt to navigate the directory of files on tape (ls and cd commands). To mark a file or file(s) for restoring use "add filename" where filename may contain wildcards. To get the restore going use "extract". It will ask for a starting tape number which is most likely "1" unless your backups are split across tapes. Restore will write messages about adding directories on the path to the file(s) you want restored. I wouldn't worry about them, it will find them there and leave them (assuming you are doing an in-place restore -- see below). It will also ask you about setting modes for '.', to which I usually answer 'n' unless I am restoring the entire filesystem. If you really want to do this safely, start the restore in a different (fresh) directory, e.g. "mkdir rst", "cd rst", "restore ivf /dev/rst0" -- it will restore relative to its current directory at startup, then you can inspect and mv files over to required locations in relative safety after restore completes. -Frank McConnell