Backing Up Directory

The Linux “tar” stands for tape archive, which is used by a large number of Linux/Unix system administrators to deal with tape drives backup. The tar command used to rip a collection of files and directories into a highly compressed archive file commonly called tarball or tar, gzip and bzip in Linux. The tar is the most widely used command to create compressed archive files and that can be moved easily from one disk to another disk or machine to machine.

Syntax


tar -cvf {filename}.tar {directory}

c – Creates a new .tar archive file.
v – Verbosely show the .tar file progress.
f – File name type of the archive file.

Example


[Server]$ tar -cvf mybackup.tar /home/user/mydirectory

Cookies help us deliver our services. By using our services, you agree to our use of cookies.