no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | help:general_linux:backups [2015/08/26 16:52] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | FIXME update, convert to wiki, add link to isohome | ||
+ | |||
+ | |||
+ | |||
+ | ====== Backup With Tar ====== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | * [[: | ||
+ | * [[: | ||
+ | * [[: | ||
+ | * [[: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Overview ===== | ||
+ | |||
+ | While I make regular backups of the home directories on the Computer Science Unix machines, there are times when you want to have your own copy of your account. There are several relatively painless ways to accomplish this task. I will describe one of them here. If you need my help, [[mailto: | ||
+ | |||
+ | The process consists of making an archive file (one file that contains all your files - or at least the interesting ones) and then moving that file off of our system. | ||
+ | |||
+ | The heart of this process is the [[: | ||
+ | |||
+ | Gnu tar is / | ||
+ | |||
+ | For simplicity, if you would like to generate an ISO file of your entire home directory for simple CD burning, try using [[sysnews: | ||
+ | |||
+ | ===== Creating a tar file of your entire directory ===== | ||
+ | |||
+ | The tricky bit is that you are going to create a tar file **of** your home directory **in** your home directory that does not contain the tar file itself. To do this use the //exclude file// option to tar, this allows you to give tar the name of a file which contains file names to ignore when creating the tar file. | ||
+ | |||
+ | For the purposes of the following examples, suppose that your home directory is "/ | ||
+ | |||
+ | To make the exclude file, use any editor you like, just put one file or directory name on each line of the file and save it. For this example I will call the exclude file "/ | ||
+ | |||
+ | my.CS.account.tar.gz | ||
+ | .netscape/ | ||
+ | .dt/Trash | ||
+ | |||
+ | As you can see it lists the name of the backup archive file and also will exclude from the backup the Netscape cache (usually about 5 megs of stuff you don't need a backup of) and your desktop Trash folder. You can add any other directories or files you would like to exclude from the backup. (You can call this file anything you want to, just be sure you tell tar about it.) | ||
+ | |||
+ | With your exclude file saved you are now ready to run tar. Move up one level above your home directory, in this case to "/ | ||
+ | |||
+ | cd /home | ||
+ | |||
+ | Now issue the following tar command (be sure you are seeing the entire command in your browser, you may need to scroll to see it all): | ||
+ | |||
+ | tar czfX tegorman/ | ||
+ | |||
+ | (The above command is all on one line) | ||
+ | |||
+ | Depending on how big your account is it could take awhile to finish, but when it does, there will be a file called " | ||
+ | |||
+ | |||
+ | |||
+ | ===== Copying the file to another location ===== | ||
+ | |||
+ | Now that you have created a backup file of your account, using [[http:// | ||
+ | |||
+ | scp tegorman@mote.cs.vassar.edu: | ||
+ | |||
+ | The above will create a copy of the file on other system called csbackup.tgz. | ||
+ | |||
+ | From there it's up to you. Save it off on a zip drive, keep a copy on your personal machine, burn a CD, whatever you like. | ||
+ | |||
+ | |||
+ | |||
+ | ===== Final step ===== | ||
+ | |||
+ | Once you have copied your archive to another location, please remove the tar file from the CS machines. We do not have space to to keep a tar of each person' | ||
+ | |||
+ | rm / | ||
+ | |||
+ | You can now sleep easier knowing that you have your own copy of all your files. Should the need arise, you can restore any or all of them on our or another system. Any Linux, MacOSX or other Unix system should support this, and additional versions of tar and gzip are available for earlier versions of MacOS and for DOS and Windows, so you don't even //need// a unix machine to have access to your files. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Tar Documentation ===== | ||
+ | |||
+ | More information on tar is available in several formats and at several locations. Here are a few: | ||
+ | |||
+ | [[http:// | ||
+ | ---- | ||
+ | |||
+ | This page was written using emacs and psgml mode with an HTML 2 DTD. If you have any questions or comments about it, please send them to: | ||
+ | |||
+ | [[people: | ||
+ | |||
+ | This page last was mucked with on 5/9/02 | ||
+ | |||