Hi, Do you have any suggestions on how to backup the database or any other suggestions before upgrading Lemmy?
You must log in or # to comment.
To dump a simple postgresql database, you can do something like:
pg_dump postgresql://lemmy:mypassword@example.com/lemmy -f backup.sql
This should result in a file being made named
backup.sql
for your database.As for upgrading, my small instance with a 1.5Gb database upgraded with no issues using the docker images on kubernetes.
The procedure looks straight forward enough, but depends on your installation method. Documentation can be found here: https://join-lemmy.org/docs/administration/backup_and_restore.html
Either do a
pg_dump
or stop the database and make a full copy.The
pg_dump
won’t require downtime but will take longer to restore.I use this command for the pg_dump
docker exec lemmy_postgres_1 pg_dump -Fc -U lemmy lemmy > /opt/lemmy/backup/lemmy_db_`date +%Y%m%d`.dump