Tar

From Wsms

Jump to: navigation, search

Contents

basic usage

Backup up /etc, which conatins all your settings (as root):

# cd /
# tar cvjf etc-00.tar.bz2 etc

c - create an archive v - verbose j - use bzip compression f - crate a file

notes

tar treats hardlinks sensibly in Linux file systems.

advanced usage

How to use tar and split at the same time:

tar -cf - /dir_to_tar/ | split -b 2000m - test_backup_`date +%Y%m%d`.tar.

see also

rsync

Personal tools