How-to: restore cPanel backup in DirectAdmin

FAQ has "Unable to add user atelierdabajour_wp922. String 'atelierdabajour_wp922' is too long for user name (should be no longer than 16)" covered, repeating it here :)

To make sure your MySQL username/database name is fine, I'd suggest upgrading your MySQL/MariaDB on the server (https://www.directadmin.com/features.php?id=2294), MySQL 5.7+ or MariaDB 10.x is recommended.

MariaDB 10.x supports usernames up to 80 chars, MySQL 5.7+ - 30.
 
FAQ has "Unable to add user atelierdabajour_wp922. String 'atelierdabajour_wp922' is too long for user name (should be no longer than 16)" covered, repeating it here :)


MariaDB 10.x supports usernames up to 80 chars, MySQL 5.7+ - 30.

Is there a problem with leaving a high character limit?
 
No, you can use long usernames with newer versions of MariaDB/MySQL :)
 
Bug to deletion

Hi,

After restored , now I cant delete the user :


Cannot Execute Your Request
The username is invalid. Usernames must start with a-z, contain >= 3 characters and <= 10.

Please seems to be bug to account deletion
 
Hi,

After restored , now I cant delete the user :


Cannot Execute Your Request
The username is invalid. Usernames must start with a-z, contain >= 3 characters and <= 10.

Please seems to be bug to account deletion


I changed to config file
After restored all ok but I couldnt delete
I made restart all server to read again conf file and worked charmed

Thanks a lot
 
I faced this error, any ideas?

Code:
/usr/local/directadmin/scripts/cpanel_to_da/cpanel_to_da.sh: 361: Syntax error: redirection unexpected (expecting word)

Cannot find any tar.gz after converting from /home/admin/converted_user_backup/cpmove-username.tar.gz
cpmove-username is not a valid username

I checked my username and its 10 characters. In addition I am using MariaDB 10.4.

My OS is FreeBSD (I am not sure if this makes a difference)
 
I faced this error, any ideas?

Code:
/usr/local/directadmin/scripts/cpanel_to_da/cpanel_to_da.sh: 361: Syntax error: redirection unexpected (expecting word)

Cannot find any tar.gz after converting from /home/admin/converted_user_backup/cpmove-username.tar.gz
cpmove-username is not a valid username

I checked my username and its 10 characters. In addition I am using MariaDB 10.4.

My OS is FreeBSD (I am not sure if this makes a difference)

May you create a ticket with access to cpmove file?
 
I have already created the ticket and not I am going to provide you with the server details.
 
The hierarchy of my directories seems to have changed during the restore of my cpmove-USER.tar.gz in DA.

In cPanel, I had:
USER→PUBLIC_HTML
USER→ DB_CONFIG

In DA, I now have:
USER → DOMAINS → DOMAIN.COM → PUBLIC_HTML
USER → DB_CONFIG

This messes up many of my INCLUDE and REQUIRE statements. Is there any way to prevent this change during the restore?
 
The hierarchy of my directories seems to have changed during the restore of my cpmove-USER.tar.gz in DA.

In cPanel, I had:
USER→PUBLIC_HTML
USER→ DB_CONFIG

In DA, I now have:
USER → DOMAINS → DOMAIN.COM → PUBLIC_HTML
USER → DB_CONFIG

This messes up many of my INCLUDE and REQUIRE statements. Is there any way to prevent this change during the restore?

For "default" domain /home/user/public_html is a symlink to /home/user/domains/domain.com/public_html. If that's affecting your add-on domain, I'd suggest making it 'default' one to solve it.
 
I'm not sure I follow. Are you saying to make my domain name the default domain for the user?
 
So, this do not work for full account backup "backup-date_username.tar.gz" files, just work for cpmove-username.tar.gz?
 
So, this do not work for full account backup "backup-date_username.tar.gz" files, just work for cpmove-username.tar.gz?

Just rename that file and it'll work :) We may consider adding support for "backup-date_username.tar.gz" if that'd make the things easier on your side.
 
so if i have the latest update of DA, I don't need to download the migration tool script?

Can I move the back-up file with WinSCP to my VPS server's DA import folder?
 
Yes, you could move it using WinSCP, FTP or any other tool you prefer, DA would know what to do with cpmove file when restored using Admin Backup/Restore feature.
 
Yes, you could move it using WinSCP, FTP or any other tool you prefer, DA would know what to do with cpmove file when restored using Admin Backup/Restore feature.

I'm having this error could you help me?

--2020-01-10 09:42:09-- https://files9.directadmin.com/services/custombuild/zlib-1.2.11.tar.gz
Resolving files9.directadmin.com (files9.directadmin.com)... 69.162.69.58
Connecting to files9.directadmin.com (files9.directadmin.com)|69.162.69.58|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 607698 (593K) [application/x-gzip]
Saving to: '/usr/local/directadmin/custombuild/zlib-1.2.11.tar.gz'

0K .......... .......... .......... .......... .......... 8% 722K 1s
50K .......... .......... .......... .......... .......... 16% 770K 1s
100K .......... .......... .......... .......... .......... 25% 11.0M 0s
150K .......... .......... .......... .......... .......... 33% 1.58M 0s
200K .......... .......... .......... .......... .......... 42% 11.2M 0s
250K .......... .......... .......... .......... .......... 50% 1.72M 0s
300K .......... .......... .......... .......... .......... 58% 11.6M 0s
350K .......... .......... .......... .......... .......... 67% 11.8M 0s
400K .......... .......... .......... .......... .......... 75% 1.91M 0s
450K .......... .......... .......... .......... .......... 84% 12.5M 0s
500K .......... .......... .......... .......... .......... 92% 11.0M 0s
550K .......... .......... .......... .......... ... 100% 16.0M=0.2s

2020-01-10 09:42:09 (2.35 MB/s) - '/usr/local/directadmin/custombuild/zlib-1.2.11.tar.gz' saved [607698/607698]

--2020-01-10 09:42:17-- https://files9.directadmin.com/services/custombuild/pigz-2.4.tar.gz
Resolving files9.directadmin.com (files9.directadmin.com)... 69.162.69.58
Connecting to files9.directadmin.com (files9.directadmin.com)|69.162.69.58|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 98234 (96K) [application/x-gzip]
Saving to: '/usr/local/directadmin/custombuild/pigz-2.4.tar.gz'

0K .......... .......... .......... .......... .......... 52% 727K 0s
50K .......... .......... .......... .......... ..... 100% 1.35M=0.1s

2020-01-10 09:42:17 (940 KB/s) - '/usr/local/directadmin/custombuild/pigz-2.4.tar.gz' saved [98234/98234]

Max username length (10) is smaller than cPanel username (12)

Error converting file: /home/admin/user_backups/cpmove-dbo7ghligyzz.tar.gz: Found no pigz for faster compression/decompression, installing...
Downloading zlib-1.2.11.tar.gz...
Checking for gcc...
Checking for shared library support...
Building shared library libz.so.1.2.11 with gcc.
Checking for size_t... Yes.
Checking for off64_t... Yes.
Checking for fseeko... Yes.
Checking for strerror... Yes.
Checking for unistd.h... Yes.
Checking for stdarg.h... Yes.
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
Checking for vsnprintf() in stdio.h... Yes.
Checking for return value of vsnprintf()... Yes.
Checking for attribute(visibility) support... Yes.
Trying to make libz...
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o example.o test/example.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o adler32.o adler32.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o crc32.o crc32.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o deflate.o deflate.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o infback.o infback.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o inffast.o inffast.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o inflate.o inflate.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o inftrees.o inftrees.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o trees.o trees.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o zutil.o zutil.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o compress.o compress.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o uncompr.o uncompr.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzclose.o gzclose.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzlib.o gzlib.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzread.o gzread.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzwrite.o gzwrite.c
ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o example example.o -L. libz.a
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o minigzip.o test/minigzip.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip minigzip.o -L. libz.a
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/adler32.o adler32.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/crc32.o crc32.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/deflate.o deflate.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/infback.o infback.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/inffast.o inffast.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/inflate.o inflate.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/inftrees.o inftrees.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/trees.o trees.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/zutil.o zutil.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/compress.o compress.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/uncompr.o uncompr.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzclose.o gzclose.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzlib.o gzlib.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzread.o gzread.c
gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzwrite.o gzwrite.c
gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o libz.so.1.2.11 adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo -lc
rm -f libz.so libz.so.1
ln -s libz.so.1.2.11 libz.so
ln -s libz.so.1.2.11 libz.so.1
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o examplesh example.o -L. libz.so.1.2.11
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzipsh minigzip.o -L. libz.so.1.2.11
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o example64.o test/example.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o example64 example64.o -L. libz.a
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o minigzip64.o test/minigzip.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip64 minigzip64.o -L. libz.a
rm -f /usr/local/lib_da/lib/libz.a
cp libz.a /usr/local/lib_da/lib
chmod 644 /usr/local/lib_da/lib/libz.a
cp libz.so.1.2.11 /usr/local/lib_da/lib
chmod 755 /usr/local/lib_da/lib/libz.so.1.2.11
rm -f /usr/local/lib_da/share/man/man3/zlib.3
cp zlib.3 /usr/local/lib_da/share/man/man3
chmod 644 /usr/local/lib_da/share/man/man3/zlib.3
rm -f /usr/local/lib_da/lib/pkgconfig/zlib.pc
cp zlib.pc /usr/local/lib_da/lib/pkgconfig
chmod 644 /usr/local/lib_da/lib/pkgconfig/zlib.pc
rm -f /usr/local/lib_da/include/zlib.h /usr/local/lib_da/include/zconf.h
cp zlib.h zconf.h /usr/local/lib_da/include
chmod 644 /usr/local/lib_da/include/zlib.h /usr/local/lib_da/include/zconf.h
Downloading pigz-2.4.tar.gz...
Found /usr/local/directadmin/custombuild/pigz-2.4.tar.gz
Extracting /usr/local/directadmin/custombuild/pigz-2.4.tar.gz...
Installing pigz-2.4...
Trying to make pigz-2.4...
gcc -I/usr/local/lib_da/include/ -c -o pigz.o pigz.c
gcc -I/usr/local/lib_da/include/ -c -o yarn.o yarn.c
gcc -I/usr/local/lib_da/include/ -c -o try.o try.c
gcc -I/usr/local/lib_da/include/ -c zopfli/src/zopfli/deflate.c
gcc -I/usr/local/lib_da/include/ -c zopfli/src/zopfli/blocksplitter.c
gcc -I/usr/local/lib_da/include/ -c zopfli/src/zopfli/tree.c
gcc -I/usr/local/lib_da/include/ -c zopfli/src/zopfli/lz77.c
gcc -I/usr/local/lib_da/include/ -c zopfli/src/zopfli/cache.c
gcc -I/usr/local/lib_da/include/ -c zopfli/src/zopfli/hash.c
gcc -I/usr/local/lib_da/include/ -c zopfli/src/zopfli/util.c
gcc -I/usr/local/lib_da/include/ -c zopfli/src/zopfli/squeeze.c
gcc -I/usr/local/lib_da/include/ -c zopfli/src/zopfli/katajainen.c
gcc -o pigz pigz.o yarn.o try.o deflate.o blocksplitter.o tree.o lz77.o cache.o hash.o util.o squeeze.o katajainen.o -lm /usr/local/lib_da/lib/libz.a -lpthread
ln -f pigz unpigz
Make complete
Installing pigz-2.4...
Enabling pigz in directadmin.conf to use 1 CPU core(s).
pigz-2.4 has been installed successfully.
Converting dbo7ghligyzz (/home/admin/user_backups/cpmove-dbo7ghligyzz.tar.gz)...

File '/home/admin/user_backups/cpmove-dbo7ghligyzz.tar.gz' has not been restored
 
Back
Top