PERFORMING ESSENTIAL SYSTEM ADMINISTRATION TASKS in Font

Print Data Matrix 2d barcode in Font PERFORMING ESSENTIAL SYSTEM ADMINISTRATION TASKS

CHAPTER 3 PERFORMING ESSENTIAL SYSTEM ADMINISTRATION TASKS
Print ECC200 In None
Using Barcode generation for Font Control to generate, create ECC200 image in Font applications.
www.OnBarcode.com
Drawing European Article Number 13 In None
Using Barcode generation for Font Control to generate, create UPC - 13 image in Font applications.
www.OnBarcode.com
Extracting an Archive File
Barcode Encoder In None
Using Barcode maker for Font Control to generate, create Barcode image in Font applications.
www.OnBarcode.com
Painting ECC200 In None
Using Barcode encoder for Font Control to generate, create Data Matrix image in Font applications.
www.OnBarcode.com
Now that you know how to create an archive file, it s rather easy to extract it. Basically, the command-line options that you use to extract an archive file look a lot like the ones you needed to create it in the first place. The important difference is that, to extract a file, you need the option x (extract), instead of c (create). Here are some examples: tar -xvf /file.tar: Extracts the contents of file.tar to the current directory tar -zxvf /file.tar.gz: Extracts the contents of the compressed file.tar to the current directory tar -xvf /file.tar C /somedir: Extracts the contents of /file.tar to a directory with the name /somedir
Printing QR Code In None
Using Barcode generator for Font Control to generate, create QR-Code image in Font applications.
www.OnBarcode.com
UPCA Printer In None
Using Barcode generator for Font Control to generate, create UPCA image in Font applications.
www.OnBarcode.com
Moving a Complete Directory
Code 128 Code Set C Creator In None
Using Barcode generator for Font Control to generate, create Code 128 Code Set A image in Font applications.
www.OnBarcode.com
Creating Postnet In None
Using Barcode maker for Font Control to generate, create USPS POSTNET Barcode image in Font applications.
www.OnBarcode.com
Most of the time, tar is used to write a backup of one or more directories to a file. Because of its excellent handling of special files (such as stale files that are used quite often in databases), tar is also quite often used to move the contents of one directory to another. Some people perform this task by first creating a temporary file and then extracting the temporary file into the new directory. This is not the easiest way because you need twice the disk space taken by the directory whose contents you want to move: the size of the original directory plus the space needed for the temporary file. The good news is that you don t have to do it this way. Use a pipe and you can directly blow the contents of one directory to another directory. To understand how this works, first try the command tar -cC /var .. In this command, the option c is used to tell tar that it should create an archive. The option C is used to archive the contents of the directory /var, not the complete directory. This means that in the archive itself, you won t see the original directory name /var. So, if there s a file called /var/blah, you will see blah in the archive, not var/blah, which would have been the case if you omitted the option C (a leading / is always stripped from the pathname in a tar archive). Now, as you may have noticed, in the tar -cC /var example, the option f /somefile.tar isn t used to specify where the output goes, so all the output is sent to STDOUT, which is your console. Don t forget the dot at the end of the command line; it tells the tar command what it has to archive. If you forget it, tar won t archive anything and just give you the error message cowardly refusing to create an empty archive . So that s the first half of the command, and you ended up with a lot of output dumped on the console. Now, in the second part of the command, you ll use a pipe to redirect all that output to another command, which is tar -xC /newvar. This command will capture the tar archive from STDOUT and extract it to the directory /newvar (make sure that newvar exists before you run this command). You ll see that this method allows you to create a perfect copy of one directory to another. So the complete command that you need in this case looks like this: tar -cC /var . | tar -vxC /newvar
Recognizing Data Matrix ECC200 In Java
Using Barcode scanner for Java Control to read, scan read, scan image in Java applications.
www.OnBarcode.com
ECC200 Encoder In Visual Studio .NET
Using Barcode encoder for Reporting Service Control to generate, create Data Matrix 2d barcode image in Reporting Service applications.
www.OnBarcode.com
CHAPTER 3 PERFORMING ESSENTIAL SYSTEM ADMINISTRATION TASKS
EAN / UCC - 13 Creation In Java
Using Barcode creation for Android Control to generate, create EAN13 image in Android applications.
www.OnBarcode.com
Making Barcode In Visual Studio .NET
Using Barcode generation for ASP.NET Control to generate, create Barcode image in ASP.NET applications.
www.OnBarcode.com
Creating Incremental Backups
ECC200 Encoder In Objective-C
Using Barcode creation for iPhone Control to generate, create Data Matrix 2d barcode image in iPhone applications.
www.OnBarcode.com
EAN13 Generation In None
Using Barcode generator for Excel Control to generate, create GS1 - 13 image in Microsoft Excel applications.
www.OnBarcode.com
Based on the information in the previous section, you can probably see how to create a backup of one or more directories. For instance, the tar -cvf /backup.tar /var /home /srv command creates a backup of three directories: /home, /var, and /srv. Depending on the size of these directories, this command may take some time. Because such large backups can take so long, it s often useful to make incremental backups, which is a backup in which the only files that get written to the backup are those that have changed since the last backup. To do this, you need the option g to create a snapshot file. An incremental backup always follows a full backup, so you have to create the full backup first. In this full backup, you should create a snapshot file, which contains a list of all files that have been written to the backup. The following command would do that for you (make sure that the directory /backup exists before running the command): tar -czvg /backup/snapshot-file -f /backup/full-backup.tar.gz /home The interesting thing about the snapshot file is that it contains a list of all files that have been written to the backup. If, two days after the full backup, you want to make a backup of only the files that have been changed in those two days, you can repeat essentially the same command. This time, the command will check the snapshot file to find out what files have changed since the last full backup, and it ll back up only those changed files. So your Monday backup would be created by the following command: tar -czvg /backup/snapshot-file -f /backup/monday-backup.tar.gz /home These two commands created two files: a small file that contains the incremental backup, and a large file that contains the full backup. In an incremental backup scheme, you ll need to make sure that at some point a full backup is created. To do this, just remove the snapshot-file that was used in the preceding example. Because tar doesn t find a snapshot file, it will assume that you need to make a full backup and create the new snapshot file for you. If you want to restore all files from an incremental backup, you need to restore every single file, starting with the first file that was created (typically the full backup) and ending with the last incremental backup. So, in this example, the following two commands would restore the file system back to the status at the time that the last incremental backup was created: tar -xzvf /backup/full-backup.tar.gz tar -xzvf /backup/monday-backup.tar.gz
Barcode Scanner In Java
Using Barcode decoder for Java Control to read, scan read, scan image in Java applications.
www.OnBarcode.com
Code 128A Maker In Java
Using Barcode creation for BIRT Control to generate, create Code 128A image in Eclipse BIRT applications.
www.OnBarcode.com
ANSI/AIM Code 128 Decoder In Java
Using Barcode recognizer for Java Control to read, scan read, scan image in Java applications.
www.OnBarcode.com
UPC-A Supplement 5 Printer In Java
Using Barcode creator for Java Control to generate, create UPC-A Supplement 2 image in Java applications.
www.OnBarcode.com
Create QR Code ISO/IEC18004 In VS .NET
Using Barcode printer for .NET framework Control to generate, create QR Code image in .NET applications.
www.OnBarcode.com
Code-39 Generator In None
Using Barcode generation for Online Control to generate, create Code 3 of 9 image in Online applications.
www.OnBarcode.com
Copyright © OnBarcode.com . All rights reserved.