If you are system administrator you will regularly come across tasks of migrating extremely large accounts, some have even size of terabytes. In this case you can’t simply use the pkgaccount function and transfer whole account. As it takes very long time to finish and 95% of the time you will always find files missing after restoring the account. So what I did was was use pkgaccount with skiphomedir parameter. It will make backup of account skipping home directory. You can restore it on new server and after that rsync the home directory. So that no files may miss during transfer.
Make pkgaccount and transfer it to new server
[bash]
/scripts/pkgacct –skiphomedir servertechsupport
scp /home/cpmove-servertechsupport.tar.gz root@NEW_SERVERIP:/home
[/bash]
Now on the new server restore the account and rsync the home directory
[bash]
/scripts/restorepkg /home/cpmove-servertechsupport.tar.gz
rsync -avz root@OLD_SERVER_IP:/home/servertechsupport/* /home/servertechsupport/
[/bash]
You should run the rsync command in screen so that it will continue running in background even if your shell got disconnected.
Leave a Reply