Partial backup didn't include email accounts

albatroz

Well-Known Member
Mar 6, 2003
401
6
168
Virtual Orbis / Peru
cPanel Access Level
Root Administrator
Twitter
Early today I made a partial backup of an account using the command /scripts/pkgacct --skiphomedir XXX
however when I restored the backup file to another server
I noticed that the email accounts weren't created

I used this command before and WHM/CPanel created the folders for email accounts.
So I don't know what may have changed.
Do you?

My purpose is migrate the email messages later using rsync
 
Last edited by a moderator:

albatroz

Well-Known Member
Mar 6, 2003
401
6
168
Virtual Orbis / Peru
cPanel Access Level
Root Administrator
Twitter
I need to migrate a CPanel account that is using 90% of the disk space of a VPS
so I can't use CPanel migration tools.
I thought I could use the pkgacct command in this case and migrate mailboxes contents with rsync later but I got the following response from CPanel support.

Can you give me a suggestion?

Email account information is located in the following file paths:

/home/$user/etc/$domain/passwd
/home/$user/etc/$domain/shadow

Therefore, when using the --skiphomedir option with pkgacct, the email accounts will not be included in the backup. If you need to create a backup that includes the email accounts, you will not be able to use the --skiphomedir option. I apologize for any inconvenience. Please let us know if you have any questions.
 
  • Like
Reactions: sweekeong81

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Hi @albatroz


I'm curious, you mentioned your end goal was to rsync the data from the current server to the new server - is there a reason you can't rsync it directly from the current account?

As far as the compressed suggestion:

Transfer Tool - Version 78 Documentation - cPanel Documentation
Select Compressed Transfers to compress the files during the rsync process when the remote server transfers the files between the remote and destination servers.

Note:

This option does not affect the package account function, which creates a gzip archive of the user's account on the remote server.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Hi @albatroz


That is not what I'm relaying. I'm saying that either way a copy of the account is made and sent to the destination server but it's got to be created on the source server. If there's not enough space on the source server to create this then you will not be able to transfer.
 

albatroz

Well-Known Member
Mar 6, 2003
401
6
168
Virtual Orbis / Peru
cPanel Access Level
Root Administrator
Twitter
I still can't understand how could make WHM to transfer an account with 20GB of data if the source server
only has 4GB of free disk space.

Hi @albatroz


That is not what I'm relaying. I'm saying that either way a copy of the account is made and sent to the destination server but it's got to be created on the source server. If there's not enough space on the source server to create this then you will not be able to transfer.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
I still can't understand how could make WHM to transfer an account with 20GB of data if the source server
only has 4GB of free disk space.
Again, this can't be done, you need the amount of space a full backup takes on the source server, otherwise, this process will fail unless you're doing one account at a time and the account's backup does not consume more than 4GB
 

sweekeong81

Registered
Aug 27, 2019
2
0
1
Malaysia
cPanel Access Level
Root Administrator
Hi,

It took few hours to troubleshoot missing email accounts until I saw this thread. I migrated to new server using Transfer Tool & pkgacct with skip home directory option. Then I did rsync mail/ directory. The email accounts don't show up in cPanel :eek:.

Only after I did rsync etc/ directory then the missing email accounts show up per information here. Thanks!! :)

Email account information is located in the following file paths:

/home/$user/etc/$domain/passwd
/home/$user/etc/$domain/shadow


Therefore, when using the --skiphomedir option with pkgacct, the email accounts will not be included in the backup. If you need to create a backup that includes the email accounts, you will not be able to use the --skiphomedir option. I apologize for any inconvenience. Please let us know if you have any questions.