About Me
Name: Joshua Lyon
Birthday: August 8, 1985
Location: Grapevine, TX
E-mail: josh@boshdirect.com
| Backup site (files) from Shell |
| Written by Josh Lyon | |||
| Friday, 25 January 2008 07:42 | |||
|
Here's a quick code snippet on how to backup files and restore them from the shell. $ tar -zcvf filename.tar.gz folder/ To backup all files in the directory you are currently in, run: $ tar -zcvf filename.tar.gz . Here's a breakout of the parameters: z - gzip compression c - compress the files v - verbose output (lists the files) f - file To uncompress the file(s) (eg. unload to server - overwriting files), use the following: $ tar -zxvf filename.tar.gz The key difference is the c in the compress command above was replaced with an x for the extract command.
Bookmark
Email This
Hits: 535 Comments (0)
![]() Write comment
|
