Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kevinuaa

macrumors member
Original poster
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
 
For a WWW server it's likely "flat" files with no Mac resource forks to worry about, so you can use
Code:
tar czf mybackup.tar.gz root/www/folder/folderiwanttobackup
To restore, it would be
Code:
tar fxzps mybackup.tar.gz

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

Code:
ditto -c -z --rsrc root/www/folder/folderiwanttobackup mybackup.cpgz
and restore with
Code:
ditto -x mybackup.cpgz root/www/folder/folderiwanttobackup
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.