./data/ - required. You can skip cache/; FreshRSS rebuilds it../extensions/ - recommended if you use third-party extensions../i/themes/ - optional, only if you have added custom themes../cli/db-backup.php (portable SQLite per user) or mysqldump/pg_dump. SQLite is covered by ./data/ above.All other folders belong to the source code and are restored by a fresh install or upgrade.
Do this before an upgrade.
The following commands assume your FreshRSS directory is /usr/share/FreshRSS; substitute your path if installed elsewhere.
ℹ️ It is safer to stop your web server and cron during maintenance operations.
Back up each user’s database to ./data/users/*/backup.sqlite:
cd /usr/share/FreshRSS/
./cli/db-backup.php
Save the backup to your home directory:
cd ~
Create a gzipped tar archive of the FreshRSS directory:
tar -czf FreshRSS-backup.tgz -C /usr/share/FreshRSS/ .
Extract the backup into your FreshRSS directory:
tar -xzf ~/FreshRSS-backup.tgz -C /usr/share/FreshRSS/
Restore each user’s database from ./data/users/*/backup.sqlite:
cd /usr/share/FreshRSS/
./cli/db-restore.php --delete-backup --force-overwrite
For ongoing on-server backups, separate from the one-shot db-backup.php / db-restore.php migration workflow, enable automatic SQLite export in ./data/config.php:
'auto_sqlite_export' => [
'enabled' => true,
'retention' => 7,
],
Then schedule it (for example via cron):
./cli/export-sqlite-auto.php
Each run writes ./data/users/<username>/sqlite-backups/<YYYYMMDDTHHMMSSZ>.sqlite (UTC) for every user and prunes older files to the configured retention count.
First, back up all user databases to SQLite files:
cd /usr/share/FreshRSS/
./cli/db-backup.php
Change your database setup:
./data/config.php accordingly.Restore all user databases from the SQLite files:
cd /usr/share/FreshRSS/
./cli/db-restore.php --delete-backup --force-overwrite
See also our Docker documentation for migrating the database.
For a settings-only backup, save the following files and keep their original paths.
./data/config.php for the installation’s settings../data/users/<username>/config.php for each user’s settings.Keep these copies private, as configuration files can contain credentials. To keep subscriptions as well, export the feed list for each user. Use the full backup to preserve the complete installation, including its databases.
You can export your feed list in OPML format either from the web interface, or from the command-line interface.
The OPML export only includes the standard OPML parameters; it omits FreshRSS-specific attributes like refresh frequency, credentials, user agent, and XPath web scraping rules.
For a full export including these, use the SQLite export described below.
You can use phpMyAdmin or mysqldump. Replace <db_user> with your database username, <db_host> with your database server hostname, and <freshrss_db> with the FreshRSS database name:
mysqldump --skip-comments --disable-keys --user=<db_user> --password --host <db_host> --result-file=freshrss.dump.sql --databases <freshrss_db>
Export your database to a SQLite file with the command-line interface:
./cli/export-sqlite-for-user.php --user <username> --filename </path/to/db.sqlite>
Import the SQLite file back into your database:
./cli/import-sqlite-for-user.php --user <username> --filename </path/to/db.sqlite>
ℹ️ The database filename must use the
.sqliteextension for both commands to work.
The export/import flow is useful when you need to: