Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Jun 2007
    Posts
    12

    Default pkgacct/restorepkg replacement?

    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. #2
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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.

Similar Threads & Tags
Similar threads

  1. /scripts/restorepkg question - can 2 or more restorepkg run at the same time?
    By sharmaine001 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-05-2010, 10:54 AM
  2. Bandwidth usage lost after pkgacct / restorepkg
    By nicklas in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 06-11-2007, 02:58 AM
  3. mass restorepkg( messy ) mass pkgacct
    By robert M in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-22-2005, 09:28 AM
  4. New Server Replacement?
    By ThaMATRiX in forum cPanel and WHM Discussions
    Replies: 11
    Last Post: 10-12-2004, 12:26 AM
  5. Manual Backups - pkgacct and restorepkg
    By bjdea1 in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 08-15-2004, 04:05 AM
Tags for this Thread
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube