Skip to main content

copy cpanel account without much free space

Comments

3 comments

  • vacancy
    In this backup, firstly files and database are collected in a temporary folder, then they are compressed and transferred to the opposite server. So you will need as much space as the site is using, or even a little more. If you can define an additional disk space on the server, you can add this space as home2 and move the site to this area and then try to transfer.
    0
  • cPRex Jurassic Moderator
    If you have root access to both systems you can do the following: /scripts/pkgacct --skiphomedir
    This will create a package without the user data from /home/username. It will still create databases, database content, email addresses and password (no content though), and enough details to make the cPanel account on the new system. You can then move that package file, which will be located in /home and named cpmove-username.tar.gz over to the new server and restore it. After that, you can rsync the content of /home/username between the two systems. As long as most of your content isn't in databases, this is a good way to move data when you are short on space. More details on flags for pkgacct can be found here: The pkgacct Script - Version 84 Documentation - cPanel Documentation
    0
  • GoWilkes
    I went through a similar process recently... the best solution I could find was to use rsync and bypass cPanel entirely. My notes: -z enable compression (increases server load, so maybe not use on first run) -v verbose -r recursive (not necessary if you use -a) -a archive; automatically uses recursive mode and preserves symbolic links, permissions, timestamp, owner, and group -u update; do not overwrite a file at the destination, if it is modified at the destination -R --relative, maybe use to create full directory tree? I'm not sure, something about using a . as an anchor somewhere. Otherwise, though, you have to create the directories manually -pog preserve permissions, owner, group (not necessary if you use -a) --dry-run also -n; I haven't used it, but it let's you "double check your arguments before executing" --progress displays detailed progress of rsync execution --exclude optionally exclude a directory or file; eg, --exclude 'foo' --exclude 'bar' /home/example/www alternative, --exclude={'foo','bar'} /home/example/www pattern, --exclude '*.jpg' /home/example/www -e 'ssh -p 1234' specify port if different from regular port ## Actual usage, where --progress, -e, and --exclude are optional: # rsync -avu --progress -e 'ssh -p 1234' --exclude={'foo','bar'} root@123.45.67.89:/home/old_account/www/ /home/new_account/www/ (When you submit, it will ask for Password for the old server)
    I'm pretty sure there's a modifier you can plug in to automatically delete the file from the source once it's copied, but that's just playing with fire...
    0

Please sign in to leave a comment.