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.

pkgacct/restorepkg replacement?

Discussion in 'General Discussion' started by xous, Oct 7, 2008.

  1. xous

    xous Member

    Joined:
    Jun 12, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Currently my strategy for moving large cPanel accounts in a reasonable amount of time is somewhat of a kludge.

    Code:
    USER=useraccount
    
    rsync -av /home/${USER} newserver.example.net:/home
    mkdir /home/${USER}.tmp
    mv /home/${USER}/{mail,public_html,public_ftp,tmp} /home/${USER}.tmp
    pkgacct ${USER}
    rsync -av /home/cpmove-${USER}.tar.gz newserver.example.net:/home
    mv /home/${USER}.tmp/* /home/${USER}/
    rmdir /home/${USER}.tmp
    rm /home/cpmove-${USER}.tar.gz
    
    
    Warning this was done from memory and may not be entirely accurate do not use.

    Doing as above saves hours when doing backups but also takes the users site offline while the the cpbackup is created (usually only a minute with all the data removed).

    I was hoping cPanel might provide a version of pkgacct that allows you to pass --exclude-from to the tar command ran by pkgacct.

    Does anyone else have a more elegant solution to the problem?
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    You can pass --skiphomedir to prevent inclusion of /home/user in the resulting tarball.

    Also, the existence of .cpbackup-skip in a directory will cause the directory to be skipped.
     
Loading...
Similar Threads - pkgacct restorepkg replacement
  1. stormthefront
    Replies:
    1
    Views:
    247
  2. Moses Moore
    Replies:
    7
    Views:
    1,243

Share This Page