From 2748cddf5308f8dc7033888ff1c1df68dc78be69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Thu, 26 Jan 2023 13:45:59 +0100 Subject: [PATCH] Updated Backup & Restore Data (markdown) --- Backup-&-Restore-Data.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Backup-&-Restore-Data.md b/Backup-&-Restore-Data.md index 19c7fe6..73ac2fe 100644 --- a/Backup-&-Restore-Data.md +++ b/Backup-&-Restore-Data.md @@ -19,3 +19,20 @@ If you are using sqlite, it is sufficient to just copy your `app.db` from your d #### MySQL / MariaDB For MySQL / MariaDB you have to dump the database to an SQL file. You can do this manually with phpmyadmin, or you use [`mysqldump`](https://mariadb.com/kb/en/mariadb-dumpmysqldump/) to dump the database to an SQL file via command line interface (`mysqldump -uBACKUP -pPASSWORD DATABASE`) +## Restore +Install Part-DB as usual as described in the installation section, with the exception of the database creation / migration part. You have to use the same database type (sqlite or mysql) as on the back-uped server instance. + +### Restore configuration +Copy configuration files `.env.local`, (and if existing) `config/parameters.yaml` and `config/banner.md` from the backup to your new Part-DB instance and overwrite the existing files there. + +### Restore attachment files +Copy the `uploads/` and the `public/media/` folder from your backup into your new Part-DB folder. + +### Restore database +#### Sqlite +Copy the backup-ed `app.db` into the database folder normally `var/app.db` in Part-DB root folder. + +#### MySQL / MariaDB +Recreate a database and user with the same credentials as before (or update the database credentials in the `.env.local` file). +Import the dumped SQL file from the backup into your new database. +