Server Administration & Management

How to create a tar archive from a directory

How can you do this? It’s not difficult at all. For exemple to backup a user home directory you would have to run:

# tar -pczf rchive.tar.gz /home/USERNAME

Since I started working with cPanel server I always needed to create archives from directories.
For example backing up a user’s home directory.

You can read more about tar by reading it’s manual.

# man tar


January 31, 2011 Posted by | Tips & Tricks, Unix/Linux | , , , , | Leave a comment