Hi, Do you have any suggestions on how to backup the database or any other suggestions before upgrading Lemmy?

  • RuudA
    link
    English
    2
    edit-2
    1 year ago

    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