How to backup the DB before upgrading Lemmy?
Hi, Do you have any suggestions on how to backup the database or any other suggestions before upgrading Lemmy?
Hi, Do you have any suggestions on how to backup the database or any other suggestions before upgrading Lemmy?
To dump a simple postgresql database, you can do something like:
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.
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
you can run something like this on the host - make sure you use the correct container name
suggest you not leave unencrypted backup on the host system but copy it somewhere else, preferably after encrypting it with gpg.