cPanel and Plesk import

@HostXNow

Backup is full backup generated from cPanel wizard? As you can see that for the first run it look for the meta file that cPanel usually generates, not sure why it could not find or was it not there?

/home/backup/user1/userdata/main

Second time something is wrong with MySQL restore, maybe need to investigate more why mysql is not there or can’t restore. Can you contact me via slack.

I I also got this error: [Errno 2] No such file or directory: ‘/home/backup/backup-8.2.2019_00-25-28_domaininfo/meta.xml’ [5009]

I did a full cPanel backup which I downloaded from cPanel, uploaded to /home/backup/

@NiiYankee Can you create ticket and send us a backup file if possible?

@HostXNow and @NiiYankee I’ve had another user report this error and @w3services contacted us regarding this issue.

It turns out that cPanel generated backup file was not complete and or corrupt, you need to have complete file to generate the backup successfully. Once the complete backup file was provided, restore went fine.

Hi, i have some cPanel migration problems, I uploaded the cpanel pkgacct cpmove-user.tar.gz to /home/backup and run the command. but nowhere to find the users email boxes, what could be wrong?

  • do you need to create first this user and a package before starting the migration?

  • can I upload the cpmove file as root and run migration command as root?

  • I also noticed that a folder called /akeebabackup below the /public_html was removed or not converted, now some of the website have folders below /public_html for their CMS, that would mean manually upload?

Any help or suggestions much appreciated

Another attempt, but i just can’t get my 3 emailboxes…

@Nick

If those folders belong to subdomains/child-domains they are created in CyberPanel but in a different way under the document root of master domain.

Such as /home/masterdomain.com/public_html/childomain.com

So folder structure might slightly change during conversion from cPanel.

Regarding your email boxes, when you restore cPanel backup file kindly grep the output using

grep Failed

Or at the start of the process, it will output the log file, you can do

cat filename | grep Failed

and share the output here, will see if email restore failed.

Hi, thanks for the reply, the folders belong to the domain no subdomains or any child as you call them, it looks like your cPanel converter just copies all the files from /public_html but ignores anything below, and some CMS or backup programs keeps files below.

I will use the grep failed but since the cpmove is huge file [a good 11GB] and this time I try with a cpmove instead of a full nightly backup.

BRB

Failed to restore emails from archive file /home/backup/cpmove-user.tar.gz, error message: [Errno 2] No such file or directory: ‘/home/backup/cpmove-user/homedir/mail/mailbox_format.cpanel’. [ExtractBackup]

I tried it with a full nightly backup and a pkgacct [cpmove-user] file

Any suggestions?

OK, found the problem in the script, but it is late and i need my sleep, we don’t need the mdbox as we use maildir…

Find Mail Format

        UserData = '%s/homedir/mail' % (CompletPathToExtractedArchive)
        FormatPath = '%s/mailbox_format.cpanel' % (UserData)

        message = 'Detecting email format from %s.' % (self.backupFile)
        logging.statusWriter(self.logFile, message, 1)

        Format = open(FormatPath, 'r').read()

        if Format.find('mdbox') > -1:
            self.mailFormat = cPanelImporter.MdBox
            message = 'Mdbox format detected from %s.' % (self.backupFile)
            logging.statusWriter(self.logFile, message, 1)
        else:
            self.mailFormat = cPanelImporter.MailDir
            message = 'Maildir format detected from %s.' % (self.backupFile)
            logging.statusWriter(self.logFile, message, 1)

        ####

Perhaps I can peek and poke it…

@Nick

great information, I will give you my detailed reply soon. Looks like your backup file didn’t have mail format file. More on this later.

So @Nick if we don’t see the format file we can default to Maildir format, that should fix your issue.

Hi, this comes from a cPanel server with Maildir as default, I have double checked it. The backup should have it all in Maildir format, I checked the backup file and no such file to indicate we use mdbox is in there, but for some reason it is not detecting it…

@CyberPanel
sorry, but how will this fix my issue?

@Nick

I released v1.8.9. So if the format file does not exists. It will now defaults to Maildir format, you can upgrade and try again.

OK, BRB, thank you

@CyberPanel great news!

cd
rm -f upgrade.py
wget http://cyberpanel.net/upgrade.py
python upgrade.py

python /usr/local/CyberCP/plogical/cPanelImporter.py --path /home/backup/

Creating DNS records…,10

/usr/lib/python2.7/site-packages/requests/init.py:80: RequestsDependencyWarning: urllib3 (1.22) or chardet (2.2.1) doesn’t match a supported version!
RequestsDependencyWarning)

Setting up directories…,25

Emails successfully restored

Great!!!
Thanks ever so much, now i need to check if all has come over…

What about that error?
I didn’t had that before…

Just a warning, so your emails are ok now ? @Nick

@CyberPanel

Hi, yes some mail has come over but… I am so sorry, a few things are not correct, I hope you don’t mind me saying… so you can improve your script and attract cPanel users :slight_smile:

What happens is when the conversion script run is that it indeed found all the users, and then retrieved all emails [from /cur] and moved them in their new account on Cyberpanel.

  • The date and time of those emails are not preserved, they have the date/time from the conversion, this should not happen, email should keep their date/time.

  • The folder structure is not preserved, all email in one user, your structure:
    /home/vmail/domain/user/Maildir/cur
    / new
    /tmp

cPanel folder structure from user with [n] folders are gone, all emails in just that one /cur folder…

Seems to me, the emails your script has moved to Cyberpanel are the ones in the folder cur and did not look for anything in folders. So, many thousands of emails have gone lost for the users who have organised all their emails in folders.

I hope you understand what I say.
Kind regards,
Nick

Any one?