-
R En authoredb0a26bc7
Backup your Funkwhale instance
Note
Before upgrading your instance, we strongly advise you to make at least a database backup. Ideally, you should make a full backup, including the database and the media files.
Docker setup
If you've followed the setup instructions in :doc:`../installation/docker`, here is the backup path:
Multi-container installation
Backup the db
On docker setups, you have to pg_dumpall
in container funkwhale_postgres_1
:
docker exec -t funkwhale_postgres_1 pg_dumpall -c -U postgres > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
Backup the media files
To backup docker data volumes, as the volumes are bound mounted to the host, the rsync
way would go like this:
rsync -avzhP /srv/funkwhale/data/media /path/to/your/backup/media
rsync -avzhP /srv/funkwhale/data/music /path/to/your/backup/music
Backup the configuration files
On docker setups, the configuration file is located at the root level:
rsync -avzhP /srv/funkwhale/.env /path/to/your/backup/.env
Non-docker setup
Backup the db
On non-docker setups, you have to pg_dump
as user postgres
:
sudo -u postgres -H pg_dump funkwhale > /path/to/your/backup/dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
Backup the media files
A simple way to backup your media files is to use rsync
:
rsync -avzhP /srv/funkwhale/data/media /path/to/your/backup/media
rsync -avzhP /srv/funkwhale/data/music /path/to/your/backup/music
Backup the configuration files
rsync -avzhP /srv/funkwhale/config/.env /path/to/your/backup/.env
Note
You may also want to backup your proxy configuration file.
For frequent backups, you may want to use deduplication and compression to keep the backup size low. In this case, a tool like borg
will be more appropriate.