Backup  [SOLVED]

General discussions around KeyHelp.
Post Reply
User avatar
rogernet
KeyHelp Translator
Posts: 26
Joined: Tue 3. Nov 2020, 20:56
Location: Brazil
Contact:

Backup

Post by rogernet »

I have a KeyHelp Free installation on a server and I'm migrating to another server. First of all, I backed up the current server on Dropbox via KeyHelp itself. However, after installing the new KeyHelp on the new server, I tried to restore the backup, via KeyHelp itself, and an error occurred, “http 500”, and I can no longer access the new server. The current server is running Ubuntu 22.04 and the new one is running 24.04.
My questions are: does the operating system version have to be the same? Does restoring the backup to the new server restore the entire system?

Thanks.
User avatar
Alexander
Keyweb AG
Posts: 4448
Joined: Wed 20. Jan 2016, 02:23

Re: Backup  [SOLVED]

Post by Alexander »

Hello Rogério,

Please have a look into this thread: viewtopic.php?t=11833
It describes how to perform a complete restore of a server backup
The thread refers to the current restore guide as PDF: https://www.keyweb.de/assets/uploads/pd ... n-2025.pdf

Also you can find an additional automatisation tool made by Community Moderator Tobi in the German thread (viewtopic.php?t=11827) - For convenience, here is the translated text and the link to his script, in case you need it (use at your own risk).
Tobi + Translation by ChatGPT wrote:After getting lost in groups and users during my last recovery attempt, I’ve now written a small script that automates the database operations and file changes.

It’s intended to handle the restoration steps as follows:

- Preparation step ==> 3 (Backup of the current MySQL user configuration)
- Restore steps 1a and 1b
- Restore step 2, part 2 (Restart the database server after completing the restoration)

The script also takes care of restarting the database. So there’s no need to manually back up and restore the MariaDB users in PhpMyAdmin anymore — the script handles that. It also edits the files /etc/passwd, /etc/shadow, /etc/group, /etc/gshadow, and the encryption in /etc/keyhelp/config/config.json. All automatically — at your own risk :-). But don’t worry, a backup is made of every file before it’s modified.

It’s also important to strictly follow Florian’s instructions and use the /restore folder. It won’t work with other paths. The automatically generated keyhelp_login_data file must also be present — the MariaDB password is extracted from this file.

If you have any questions, please ask here in the thread.

To make it as easy as possible to get the script into your SSH console, just run this one-liner:

Code: Select all

wget https://community.keyhelp.de/download/file.php?id=2703 -O restore.php ; php restore.php ;
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
rogernet
KeyHelp Translator
Posts: 26
Joined: Tue 3. Nov 2020, 20:56
Location: Brazil
Contact:

Re: Backup

Post by rogernet »

I'll try. Thank you, my friend.

Alexander wrote: Mon 2. Jun 2025, 11:37 Hello Rogério,

Please have a look into this thread: viewtopic.php?t=11833
It describes how to perform a complete restore of a server backup
The thread refers to the current restore guide as PDF: https://www.keyweb.de/assets/uploads/pd ... n-2025.pdf

Also you can find an additional automatisation tool made by Community Moderator Tobi in the German thread (viewtopic.php?t=11827) - For convenience, here is the translated text and the link to his script, in case you need it (use at your own risk).
Tobi + Translation by ChatGPT wrote:After getting lost in groups and users during my last recovery attempt, I’ve now written a small script that automates the database operations and file changes.

It’s intended to handle the restoration steps as follows:

- Preparation step ==> 3 (Backup of the current MySQL user configuration)
- Restore steps 1a and 1b
- Restore step 2, part 2 (Restart the database server after completing the restoration)

The script also takes care of restarting the database. So there’s no need to manually back up and restore the MariaDB users in PhpMyAdmin anymore — the script handles that. It also edits the files /etc/passwd, /etc/shadow, /etc/group, /etc/gshadow, and the encryption in /etc/keyhelp/config/config.json. All automatically — at your own risk :-). But don’t worry, a backup is made of every file before it’s modified.

It’s also important to strictly follow Florian’s instructions and use the /restore folder. It won’t work with other paths. The automatically generated keyhelp_login_data file must also be present — the MariaDB password is extracted from this file.

If you have any questions, please ask here in the thread.

To make it as easy as possible to get the script into your SSH console, just run this one-liner:

Code: Select all

wget https://community.keyhelp.de/download/file.php?id=2703 -O restore.php ; php restore.php ;
Post Reply