How to restore cpanel backup with new username

Share it:


 In older version it was not possible to restore cpanel backup with new username, but In new version (WHM 11.44.1 (build 11)) its possible. Follow the below steps to do it.


  • Take backup of corresponding account
  • Terminate the account
  • Restore the account with new username


Use the below syntax to restore the cpanel backup with new username. Instead of newusername you need to give your newusername whatever you want.

# /scripts/restorepkg --newuser newusername /path/to/backup/file

For example:-

1)Taking backup of abc account using scripts command.

/scripts/pkgacct abc

2)Terminating abc account from cpanel

root@server123 [/home]# /scripts/killacct abc

3)Restoring the same domain with different/new username.

/scripts/restorepkg --newuser abc2 /home/backup-7.5.2016_14-34-21_abc.tar.gz

4) Verifying the restored account username details in home directory. Yes, its restored with new username and also created soft link

root@server57323 [/home]# ls -lh
total 926M
drwx--x--x   8 root             root             4.0K Jun 13 13:09 backup/
-rw-------   1 root             root             926M Jul  4 13:45 backup-7.4.2014_13-44-24_cloudana.tar.gz
drwx--x--x  14 abc2          abc2          4.0K Aug  8 10:34 abc2/
lrwxrwxrwx   1 root             root               13 Aug  8 10:31 abc -> /home/abc2/




Share it:

Post A Comment:

0 comments: