12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Other <strong>Linux</strong> Backup Utilities 233compressed archive file results in one file that must be decompressed and unarchivedbefore files can be restored from it. The compression of the files saves room on thebackup media. To use tar, the tar RPM package must be installed. It should be installedon your system unless you chose to only install a specific set of packages.CAUTIONThe tar utility does not preserve access control lists.To archive a set of files and compress it with bzip2:tar cjvf .tar.bz The tar arguments used are as follows:. c: create the archive. j: use bzip2 compression. v: be verbose and show the progress. f: files to archive will followA filename for the compressed archive must be given. Try to be as descriptive yet brief aspossible. The commonly used extension for a tar file compressed with bzip2 is .tar.bz.For , multiple files and directories can be specified. If a directory is specified, allthe files and subdirectories are archives as well by default.To uncompress and unarchive a tar file compressed with bzip2:tar xjvf .tar.bzWhen the files are unarchived, the original directory structure is retained. For example, ifyou specified the directory templates/ as the files to be archived, when the tar file isunarchived, the directory templates/ is created in the current working directory, and allthe original files in the directory are written in the newly created directory.File ownership is also retained by UID and GID. Keep in mind that if a tar file is createdon one system and then unarchived on a different system, the file ownership mightchange if the UID or GID is mapped to a different user or group on the second system.To list the contents of the file without uncompressing or unarchiving it:tar tjvf .tar.bz10The rsync UtilityWhen developing backup scripts, consider using the rsync utility. The rsync utility allowsyou to copy from the local system to a remote system or copy between two local directories.If the files exist in the destination directory, rsync only transfers the differences inthe files, which is ideal for backups. The rsync RPM package is required and shouldalready be installed on your system.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!