The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Manually backing up an account

Discussion in 'General Discussion' started by GoWilkes, Jul 7, 2009.

  1. GoWilkes

    GoWilkes Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    I'm always nervous about plugging code directly in to SSH, just because I know that one day I'll accidentally do something stupid and delete everything! LOL

    Would someone please glance at this and make sure that it's correct? I'm planning to copy everything in the /www/ directory (and all subdirectories) from account "domain1" to "domain2" (on the same server).

    cp /home/domain1/www/* /home/domain2/www/

    The account has about 200MB worth of storage.

    TIA,

    Jason
     
  2. stan01

    stan01 Member

    Joined:
    Jul 9, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hi Jason,

    As most Linux programs, cp also needs an argument in order to copy everything.

    Ty it this way:

    cp -r /home/domain1/www/* /home/domain2/www/

    bith this will omit dotfiles. It will be much easier to:

    cd /home/domain1/ ; cp -r www/ /home/domain2/

    assuming, there isn't www/ in /home/domain2/

    and don't forget to chown once the copy is over ;)
     
  3. tushit

    tushit Member
    PartnerNOC

    Joined:
    Dec 16, 2003
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Philadelphia, USA
    It is good to do it manually, but cPanel has such a wonderful backup tool and I would recommend using that.
     
Loading...

Share This Page