Page 1 of 1

Restore New management Backup form old server to new server

Posted: Thu 15. Jul 2021, 11:58
by Nikitaidis
Hi,
How can use Restore New management Backup form old server to new server ?

Regards
Michael

Re: Restore New management Backup form old server to new server

Posted: Thu 15. Jul 2021, 12:13
by Alexander
Hey,

one workflow in case of a full server transfer could be:

Server A:
1) Setup a remote backup repository
2) Create a full server backup into this repository

Server B:
1) Setup the same remote repository, after server A has finished its backup job
2) Wait some minutes, the content of this repository / the backup will be read
3) Click on restore and restore all databases which belong to root - (search for (root) in the search box), also restore all paths.
4) Wait until the restore has finished.
5) You probably have to setup the repository again, as the KeyHelp database has been overwritten meanwhile.
6) Now all the other content like databases / emails can be restored.
7) As a last step, one may need to update settings like the server name and IP addresses etc.

Re: Restore New management Backup form old server to new server

Posted: Sat 17. Jul 2021, 01:11
by Nikitaidis
SFTP show error when I add it ( I add my password correct )


[1;33mCommand: [0m[1mnice -n 0 sudo -u 'root' RCLONE_CONFIG='/backup-keyhelp/root/6_20210716_230736_366371/rclone' restic --cache-dir '/backup-keyhelp/root/cache/' --json --repo 'rclone:rclone-storage:/all_backup/' --password-file '/backup-keyhelp/root/6_20210716_230736_366371/restic_password' cat config[0m [1;31mError: [0mFatal: wrong password or no key found [1;33mCommand: [0m[1mnice -n 0 sudo -u 'root' RCLONE_CONFIG='/backup-keyhelp/root/6_20210716_230736_366371/rclone' restic --cache-dir '/backup-keyhelp/root/cache/' --json --repo 'rclone:rclone-storage:/all_backup/' --password-file '/backup-keyhelp/root/6_20210716_230736_366371/restic_password' cat config[0m [1;31mError: [0mFatal: wrong password or no key found

Re: Restore New management Backup form old server to new server

Posted: Sat 17. Jul 2021, 03:06
by Alexander
Your password is not correct, or your SFTP server only accept a key auth.

Re: Restore New management Backup form old server to new server

Posted: Sat 17. Jul 2021, 12:13
by Nikitaidis
I fix problem with Password but I have other problem ... after backup start and show ( In progress (0.07 %) ) immediately backup canceled automatic . Please note that i try it in 2 differint server for backup and I get same error.


logged:

The following messages were logged:

Failed to create backup: Save(<data/aba1c7620e>) returned error, retrying after 12.19070367s: server response unexpected: 500 Internal Server Error (500)
rclone: 2021/07/17 12:04:16 ERROR : data/1b/1b2ef470973961ef394ecb991a51d57bf6ec904022485f12169182cc066e33cc: Post request put error: update stor: 450 Transfer aborted. Link to file server lost
rclone: 2021/07/17 12:04:16 ERROR : data/1b/1b2ef470973961ef394ecb991a51d57bf6ec904022485f12169182cc066e33cc: Post request rcat error: update stor: 450 Transfer aborted. Link to file server lost
Save(<data/1b2ef47097>) returned error, retrying after 18.644330146s: server response unexpected: 500 Internal Server Error (500)
rclone: 2021/07/17 12:04:17 ERROR : data/29/29417f9931dee64cc5e51466e7fed83223ba760ffe0ee265ae9e243d3edb3ef5: Post request put error: update stor: 450 Transfer aborted. Link to file server lost
rclone: 2021/07/17 12:04:17 ERROR : data/29/29417f9931dee64cc5e51466e7fed83223ba760ffe0ee265ae9e243d3edb3ef5: Post request rcat error: update stor: 450 Transfer aborted. Link to file server lost
Save(<data/29417f9931>) returned error, retrying after 16.299099478s: server response unexpected: 500 Internal Server Error (500)
rclone: 2021/07/17 12:04:27 ERROR : data/59/592e2b11d6206a01de8718ccb3eecae0ab91330bb00cf9b54dfac5f6e09a0fbe: Post request put error: update stor: 450 Transfer aborted. Link to file server lost
rclone: 2021/07/17 12:04:27 ERROR : data/59/592e2b11d6206a01de8718ccb3eecae0ab91330bb00cf9b54dfac5f6e09a0fbe: Post request rcat error: update stor: 450 Transfer aborted. Link to file server lost
Fatal: unable to save snapshot: server response unexpected: 500 Internal Server Error (500)

Re: Restore New management Backup form old server to new server

Posted: Mon 19. Jul 2021, 08:56
by Alexander
Note for using "outdated" backup remote storage and FTP.

If ProFTPD with an older version number is used on the remote storage side, it may not be able to handle TLS 1.3 correctly
(https://github.com/proftpd/proftpd/issues/959).

The backup will be aborted sooner or later due to too many failed transfers and you will see such messages under "Messages":

Code: Select all

Failed to create backup: Save() returned error, retrying after 22.912714797s: server response unexpected: 500 Internal Server Error (500)
rclone: 2021/07/13 19:35:15 ERROR : data/93/93420be3074b3503ce9d2eddc756123812e9884260eb355c042e169fb6cc7044: Post request put error: update stor: 450 Transfer aborted. Link to file server lost
rclone: 2021/07/13 19:35:15 ERROR : data/93/93420be3074b3503ce9d2eddc756123812e9884260eb355c042e169fb6cc7044: Post request rcat error: update stor: 450 Transfer aborted. Link to file server lost
Save() returned error, retrying after 15.406612236s: server response unexpected: 500 Internal Server Error (500)
rclone: 2021/07/13 19:35:15 ERROR : data/fd/fda2821a0f05e08e58b754a20ff993ceb3def1c3d4b47e351adf1e71004401ab: Post request put error: update stor: 450 Transfer aborted. Link to file server lost
rclone: 2021/07/13 19:35:15 ERROR : data/fd/fda2821a0f05e08e58b754a20ff993ceb3def1c3d4b47e351adf1e71004401ab: Post request rcat error: update stor: 450 Transfer aborted. Link to file server lost
Save() returned error, retrying after 12.941307974s: server response unexpected: 500 Internal Server Error (500)
So what can be done:

If you have control over the remote storage:
  • Update to a new operating system version (and thus to a new ProFTPD version)
  • Disable TLS 1.3 via /etc/ssl/openssl.conf (setting the TLS version via the ProFTPd configuration never worked in my tests)
If you don't have control over the remote storage:
  • Switching from FTP to SFTP, if the remote server allows it
  • Change from "Explicit FTP over TLS" to "Simple FTP (unencrypted, unsecured)"
  • Inform the operator of the remote server and ask for an update

Re: Restore New management Backup form old server to new server

Posted: Mon 4. Apr 2022, 10:46
by jojoflower
Alexander wrote: Thu 15. Jul 2021, 12:13 Hey,

one workflow in case of a full server transfer could be:

Server A:
1) Setup a remote backup repository
2) Create a full server backup into this repository

Server B:
1) Setup the same remote repository, after server A has finished its backup job
2) Wait some minutes, the content of this repository / the backup will be read
3) Click on restore and restore all databases which belong to root - (search for (root) in the search box), also restore all paths.
4) Wait until the restore has finished.
5) You probably have to setup the repository again, as the KeyHelp database has been overwritten meanwhile.
6) Now all the other content like databases / emails can be restored.
7) As a last step, one may need to update settings like the server name and IP addresses etc.
dear alexander

I did everything as written above. the databases from root(keyhelp) could be restored without errors. the e-mail accounts and home directories of the users as well. but what didn't work was the replay of the user databases. The log file then says "failed to restore database" that comes from all user databases. otherwise everything is available.

System currently: Debian 10.12 (64-bit) / KeyhelpPanel 22.0 (Build 2393)
Future system: Debian 11.3 (64-bit) / KeyhelpPanel 22.0 (Build 2393)

I could log into phpmyadmin on the new server (sql) only with the new access data from the future system. the databases were not all available.
I could probably only import the databases manually if I saved them with the old backup or exported them using keyhelp. but that would not be the right solution in the long run.

best recards

Re: Restore New management Backup form old server to new server

Posted: Mon 11. Apr 2022, 10:45
by Alexander
As also written via PM, here again for the public:

Debian 10 comes with MariaDB 10.3
Debian 11 comes with MariaDB 10.5

MariaDB made significant structural changes within its internal tables. For this reason a restore of the database "mysql" will most likely not work. Backups in this case should only be done on the same OS version.
The same will be the case for Ubuntu 20 and Ubuntu 22.

That doesn't mean that it never will work again from Debian 11 to Debian 12 (depending on what changes MariaDB comes up with).

Re: Restore New management Backup form old server to new server

Posted: Mon 30. May 2022, 23:46
by goldene-zeiten
Alexander wrote: Thu 15. Jul 2021, 12:13 Hey,

one workflow in case of a full server transfer could be:

Server A:
1) Setup a remote backup repository
2) Create a full server backup into this repository

Server B:
1) Setup the same remote repository, after server A has finished its backup job
2) Wait some minutes, the content of this repository / the backup will be read
3) Click on restore and restore all databases which belong to root - (search for (root) in the search box), also restore all paths.
4) Wait until the restore has finished.
5) You probably have to setup the repository again, as the KeyHelp database has been overwritten meanwhile.
6) Now all the other content like databases / emails can be restored.
7) As a last step, one may need to update settings like the server name and IP addresses etc.
I tested it out. But after step 3 there seems to be a problem. SSH-Access is possible (with password from old server). But Login in KeyHelp is not possible anymore:

Code: Select all

MySQL - Connection Error: 1045 (Access denied for user 'keyhelp'@'localhost' (using password: YES))

Re: Restore New management Backup form old server to new server

Posted: Tue 31. May 2022, 11:39
by Alexander
Have a look in /etc/keyhelp/config/config.json and set the MySQL password of the user 'keyhelp' and 'keyhelp_root' in the mysql database accordingly.

Code: Select all

mysql -e "ALTER USER 'keyhelp'@'localhost' IDENTIFIED BY 'INSERT PASSWORD HERE';"

Code: Select all

mysql -e "ALTER USER 'keyhelp_root'@'localhost' IDENTIFIED BY 'INSERT PASSWORD HERE';"