PDA

View Full Version : command line question




kevinuaa
Aug 8, 2004, 06:30 PM
hey, i'm sorry for the stupid question, but i'd like to back up a directory on
my web server before i mess with it, and i'd really appreciate some help.

i can't just use fetch becuase soome of the file names are too long and so fech or dreamweaver will have problems with it.

i know there's a command to do a tar backup


i want to create a back up and then put it in my www folder...the path looks like below. a million thanks for any help!!

root/www/folder/folderiwanttobackup



iMeowbot
Aug 8, 2004, 06:48 PM
For a WWW server it's likely "flat" files with no Mac resource forks to worry about, so you can use
tar czf mybackup.tar.gz root/www/folder/folderiwanttobackup
To restore, it would be
tar fxzps mybackup.tar.gz

If you need to retain Mac forks, you can use the ditto command.

ditto -c -z --rsrc root/www/folder/folderiwanttobackup mybackup.cpgz
and restore with
ditto -x mybackup.cpgz root/www/folder/folderiwanttobackup

kevinuaa
Aug 8, 2004, 07:05 PM
Thanks so much!