MrDoc Deployment Guide
Quick Start
Docker Deployment
Docker Image Deployment
Docker Compose Deployment
Configure Guide
Configuration File Guide
Customizing uWSGI Configuration
Data Security
Site Data Backup / Site Migration
Data Export and Import
Open Source Edition → Professional Edition Data Migration
Troubleshooting
Server Requirements & Deployment Recommendations
Published with MrDoc Pro
-
+
home
Site Data Backup / Site Migration
## 1. Site Data Backup To prevent accidental data loss or to prepare for data migration, it is recommended to perform regular site data backups. MrDoc’s main data components include: * Database (tables and site content) * User-uploaded files (images, attachments) > i The following command-line operations assume the MrDoc code directory is `/opt/MrDoc/` ### 1.1 Database Backup #### 1.1.1 SQLite (Default Database) If you are using the default SQLite database, simply back up the `db.sqlite` file located in the `/config` directory of the project: ```bash cp /opt/MrDoc/config/db.sqlite /opt/MrDoc/config/db.sqlite.bak ``` #### 1.1.2 MySQL Database If you are using MySQL, you can export the database using the following command: ```bash mysqldump -u <username> -p <database_name> > mrdoc_backup.sql ``` * `<username>`: Database username * `<database_name>`: The database name used by MrDoc * The exported file `mrdoc_backup.sql` is your backup file #### 1.1.3 PostgreSQL Database If you use PostgreSQL, export the data using: ```bash pg_dump -U <username> -W -F c -b -v -f mrdoc_backup.pgsql <database_name> ``` * `-F c` indicates custom format, which is convenient for restoration * `-b` includes large objects (such as files) * `-v` enables verbose output #### 1.1.4 Database Data Export Alternatively, you can export database data to JSON files following these documents: * [Open Source Edition Data Export & Import](https://doc.mrdoc.pro/doc/3467/ "Open Source Edition Data Export & Import") * [Professional Edition Data Export & Import](https://doc.mrdoc.pro/doc/3468/ "Professional Edition Data Export & Import") ### 1.2 Upload Files Backup All user-uploaded local files (images, attachments) in MrDoc are stored in the `media` folder under the project directory. You can back up this folder directly: ```bash cp -r /opt/MrDoc/media /path/to/backup/media_backup ``` > i It is also recommended to back up this folder regularly. If using OSS storage (e.g., Qiniu Cloud, Alibaba Cloud), use the platform’s respective tools or APIs for backup. --- ## 2. Site Migration If you need to migrate the site from one server to another, simply copy the entire MrDoc project directory (the folder where you performed `git clone`) to the new server, then follow the normal [deployment process](https://doc.mrdoc.pro/doc/3958/ "Deployment Process") to set it up. > d If a non-default database is used, ensure that the data is restored to the new server’s database before deploying MrDoc, and that database configurations and permissions are consistent with the previous environment.
mrdoc
Nov. 18, 2025, 11:04 a.m.
Forward
Favorites
Last
Next
Scan the QR Code
Copy link
Scan the QR code to share.
Copy link
Markdown file
Word document
PDF document
PDF document (print)
share
link
type
password
Update password
Validity period