Date: Wed, 10 Jul 2002 09:18:06 -0400 (EDT) From: Jerry McAllister <jerrymc@clunix.cl.msu.edu> To: grant.cooper@nucleus.com (Grant Cooper) Cc: shadow@CPE0004761ac738-CM00109515bc65.cpe.net.cable.rogers.com (Miroslav Pendev), adriankok2000@yahoo.com.hk (adrian kok), freebsd-questions@FreeBSD.ORG (freebsd-questions) Subject: Re: backup tapes Message-ID: <200207101318.g6ADI6E24439@clunix.cl.msu.edu> In-Reply-To: <003d01c22737$df664020$7c62fea9@ab.hsia.telus.net> from "Grant Cooper" at Jul 09, 2002 05:00:42 AM
next in thread | previous in thread | raw e-mail | index | archive | help
> > Is it possible to back up on a second harddrive? The reason being is that I > am still experimenting with the installation and only want to reinstall with > configurations I did in the past to save me time. Sure if you have enough room on the drive. Just make sure there is a file system big enough and use dump(8). use 'df -k' to get an idea of how much space you will need. Lets say you have a very large disk and made a file system on it and mounted it as /scratch. (use fdisk to make one big slice, use disklabel to create one big partition in that slice use newfs to create a file system in the partition mount that partition as /scratch) Now, say you have / and a /usr/local and a /home to back up. Run the following dump commands (ideally done in single user, but I don't know anyone who can afford to have their system down long enough to run backups). dump 0af /scratch/rootdump / dump 0af /scratch/localdump /usr/local dump 0af /scratch/homedump /home Makes three backup files on the scratch disk. If you want to restore all of one of the file systems - lets say '/' Create the disk structure (fdisk, disklabel, newfs) Obviously you would then be running temporarily with something else for root Mount the intended restored root space on an alternate mount point mount /dev/wd0s2a /altroot for example Cd in to that file system cd /altroot use restore(8) to restore the backed up files. restore -xf /scratch/rootdump When it asks to set owner for . and .., say no and voila its all back. You can reset what partition it boots from (maybe swap disks or whatever) and reboot You can also restore individual files by using interactive restore. Cd to the file system cd /altroot or which ever file system will have the file restore -if /scratch/rootdump Move around in the backup directory structure using 'cd' and look for files using 'ls' sort of like in a real file system Choose which files you want to restore and "add" them add my_lost_file_a add_my_lost_file_b Ignore any message saying directory files already exist When you are finished 'add'ing files then tell it to read them with the 'extract; command extract When it asks which tape to start with enter '1' because dump/restore are tape oriented, but you are really using a file. If you are really using tapes, start with the last tape in the dump set if there are more than one tape. When it asks about setting owner for . and .., say no And now you have your files back. By the way, when you ask about DSS tapes, do you mean DAT (DDS) tapes? If so, generally you don't have to do any formatting. Just write to them. If you want to bulk erase first, do it, but BSD doesn't require any formatting to write files to tape with dump, cp, tar or dd. Tapes are sequential access, not random, though you can do file seeks - one dump is considered a single whole file. There were some old weird systems that required tapes to be formatted but I haven't seen one in a long while. ////jerry > > ----- Original Message ----- > From: "Miroslav Pendev" > <shadow@CPE0004761ac738-CM00109515bc65.cpe.net.cable.rogers.com> > To: "adrian kok" <adriankok2000@yahoo.com.hk> > Cc: "freebsd-questions" <freebsd-questions@FreeBSD.ORG> > Sent: Tuesday, July 09, 2002 8:43 AM > Subject: Re: backup tapes > > > > > Hello all > > > > > Hi Adrian, > > > > > I want to use DSS tape for backup > > > > > > > Nothing's easy than that... ;-) > > > > > 1/ What is the command for me to format the tape? > > > > > > > # this will delete the whole tape BUT may take few hours (for DDS3 ~ 3 > hours)!!! > > mt erase > > > > #for 'fast' delete - type as root (of course) > > mt erase 0 > > > > try: man mt - for other usefull commands > > > > > 2/ If the tape was used for backup window file before, > > > can I use it for backup freebsd? > > > > Just erase the tape first, and you are ready for Rock'N'Roll ;-) > > > > tips: for backup of your 'home' dir just type: > > > > tar cv /home > > > > for restore - cd to your restore folder, first, and type > > > > tar xv > > > > try: man tar for more good options > > > > > Thank you for your help > > > > > It was pleasure for me... > > > > --Miro > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-questions" in the body of the message > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207101318.g6ADI6E24439>