dedecms backend database backup and migration process

Published: 2023-06-02

A normally functioning dedecms website requires two parts: website files and the database. Both are indispensable.

After uploading the website files for dedecms, you also need to import the database. If you only have a backup from the website backend and do not have a SQL backup file in any other format, please follow the process below to reinstall dedecms and restore the database.

First, confirm whether there is a corresponding backup under /wwwroot/data/backupdata/. 

image.png

If no backup file exists, you cannot use the following method. 

  1. In File Manager or FTP Manager, locate the files under wwwroot/install, delete the install_lock.txt file, rename "index.php.bak" to "index.php", and rename "module-install.php.bak" to "module-install.php". You need to modify these three files in total. 

    image.png

  2. Visit the dedecms installation page. Use http://yourdomain/install to perform the installation. Database information can be obtained from Virtual Host Management --- Database Management.  

  3. After installation is complete, log in to the dedecms backend. In the backend, go to System — Database Backup/Restore, and click Data Restore in the upper-right corner to restore.

    image.pngimage.png

  4.  The current password is the administrator password from the time when you backed up the database, not the password you just set during the new installation. At this point, you need to log in again (you will be automatically redirected to the login page).

  5. Finally, update the website with one click so that the pages can be regenerated.