Open Nima786 opened 2 weeks ago
Can you login via SSH Key and reset the password?
Yeah but for security reasons I always login with SSH key authentication and do not use the password authorization. I can enabled to login with the password but I'm thinking if there is a way to stick with SSH key authentication.
I've added the option, but I can not test it.
set the password to empty in the config file, then you need to add to sudeors:
YOUR_USER ALL=(ALL) NOPASSWD: /usr/bin/cat YOUR_USER ALL=(ALL) NOPASSWD: /usr/bin/cyberpanel
@Nima786 I removed your reply, because it contains the password, please re-post the error as text and make sure to hash the password.
Oh thanks, I did not lokk at that carefully. After starting migration the first and second steps were successful (migrating websites, migrating emails), however it failed to transfer databases with this error:
[ 2024-11-09 11:36:40 ] Migrating website databases: example.com... [ 2024-11-09 11:36:42 ] Remote databases: xxxxxxxxxxxxxxx [ 2024-11-09 11:36:42 ] Failed to execute command: mysql -ucyberpanel -pxxxxxxxxxxxxx --batch -e "SELECT dbName,dbUser FROM databases_databases INNER JOIN websiteFunctions_websites ON websiteFunctions_websites.id = databases_databases.website_id WHERE websiteFunctions_websites.domain = 'example.com'" cyberpanel
copy the command ( mysql -ucyberpanel.... ) and run it locally in the same shell and see the output
@Nima786 please pull the latest version also
Thanks, I pulled the new version first and reolaced in my server, now after migreating the websites it gives thiss error and stops :
[ 2024-11-10 00:41:41 ] Restarting LiteSpeed. [ 2024-11-10 00:41:44 ] Updating websites credentials. [ 2024-11-10 00:41:44 ] Updating credentials for admin... [ 2024-11-10 00:41:52 ] No password for admin found on remote server, returned row: {"--------------":"SELECT password,firstName,lastName,email,type,api,securityLevel,state,initWebsitesLimit,twoFA,secretKey FROM loginSystem_administrator WHERE userName = 'admin'\r"} Returned data: [{"--------------":"SELECT password,firstName,lastName,email,type,api,securityLevel,state,initWebsitesLimit,twoFA,secretKey FROM loginSystem_administrator WHERE userName = 'admin'\r"},{"--------------":"--------------\r"},{"--------------":"\r"},{"--------------":"ERROR 1146 (42S02) at line 1: Table 'mysql.loginSystem_administrator' doesn't exist"}]
Then I ran the script only for databases and gave me the same error as before, so as you mentioned I ran that mysql command in the same shell and the output was nothing.
this is the command I ran:
mysql -ucyberpanel -pxxxxxxxxxxxxx --batch -e "SELECT dbName,dbUser FROM databases_databases INNER JOIN websiteFunctions_websites ON websiteFunctions_websites.id = databases_databases.website_id WHERE websiteFunctions_websites.domain = 'examplel.com'" cyberpanel
@Nima786 Please pull now and try again, I hope it works with you, I already migrated all my servers, so it is not easy anymore for me to test.
Yeah I undrestand, unfortunately now stucks in migrating emails step, I also ran individual script to only migrate databases to see if that part got fix, but it also has the same issue. Anyway, thanks for your support and hopefully all og these issues getting fixed in the future updates.
you can use -v argument to see all verbose command logs, give it a try. ./migrate.sh -v or PHP 01-x.php -v also you can now retry specific website ./migrate.sh --website=x.com so you can move websites one by one...
Also do not press any keyboard key while the script is running, it somehow break the input.
Thanks it gives the same errors. Hopefully if you have a time in future test it again.
Hi, I think the way this script works is to connect to the remote server via config.ini file which by default it asks for the remote server details including server password, but what about if the remote server doesn't have the password authorization and uses the ssh key for authentication and login?