command line question

Discussion in 'Mac Apps and Mac App Store' started by kevinuaa, Aug 8, 2004.

  1. kevinuaa macrumors member

    Joined:
    Jul 25, 2004
    Location:
    Hawaii
    #1
    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
     
  2. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #2
    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
     
  3. kevinuaa thread starter macrumors member

    Joined:
    Jul 25, 2004
    Location:
    Hawaii

Share This Page