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

  • @[email protected]
    link
    fedilink
    English
    11 year ago

    you can run something like this on the host - make sure you use the correct container name

    #!/bin/bash
    # check the container name with docker ps first
    container_name="instance_name_postgres_1"
    
    echo "dumping pgsql"
    # Backup command
    docker exec -t "${container_name}" pg_dumpall -c -U lemmy > lemmy_dump.sql
    

    suggest you not leave unencrypted backup on the host system but copy it somewhere else, preferably after encrypting it with gpg.