From 329fd4bcf6504c74e3906e51c6fc2124bc09cc02 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 30 Apr 2024 08:31:13 +0200 Subject: CLI database backup and restore (#6387) * CLI database backup and restore Can also be used to migrate from one database to another (e.g. MySQL to PostgreSQL) or to ease upgrade to a major PostgreSQL version (e.g. 15 to 16). * +x * Fix some cases * Update to docker-compose-v2 * More documentation --- cli/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cli/README.md') diff --git a/cli/README.md b/cli/README.md index 1ce70b5c1..366f456d5 100644 --- a/cli/README.md +++ b/cli/README.md @@ -121,6 +121,14 @@ cd /usr/share/FreshRSS ```sh cd /usr/share/FreshRSS +./cli/db-backup.php +# Back-up all users respective database to `data/users/*/backup.sqlite` + +./cli/db-restore.php --delete-backup --force-overwrite +# Restore all users respective database from `data/users/*/backup.sqlite` +# --delete-backup: delete `data/users/*/backup.sqlite` after successful import +# --force-overwrite: will clear the users respective database before import + ./cli/db-optimize.php --user username # Optimize database (reduces the size) for a given user (perform `OPTIMIZE TABLE` in MySQL, `VACUUM` in SQLite) ``` -- cgit v1.2.3