diff --git a/Backup-&-Restore-Data.md b/Backup-&-Restore-Data.md index 73ac2fe..1908266 100644 --- a/Backup-&-Restore-Data.md +++ b/Backup-&-Restore-Data.md @@ -2,7 +2,17 @@ When working productively you should backup the data and configuration of Part-DB regularly to prevent data loss. This is also useful, if you want to migrate your Part-DB instance from one server to another. In that case you just have to backup the data on server 1, move the backup to server 2, install Part-DB on server 2 and restore the backup. -## Backup +## Backup (automatic) +Part-DB includes a command `php bin/console partdb:backup` which automatically collects all the needed data (described below) and saves them to a ZIP file. + +If you are using a MySQL/MariaDB database you need to have `mysqldump` installed and added to your `$PATH` env. + +### Usage +To backup all possible data, run the following command: `php bin/console partdb:backup --full /path/to/backup/partdb_backup.zip`. + +It is possible to do only partial backups (config, attachments, or database). See `php bin/console partdb:backup --help` for more infos about these options. + +## Backup (manual) There are 3 parts which have to be backup-ed: The configuration files, which contains the instance specific options, the uploaded files of attachments, and the database containing the most data of Part-DB. Everything else like thumbnails and cache files, are recreated automatically when needed.