The fanbase is still large, but the Lemmy community hasn’t quite caught up yet, and now there is a transitional period where the audience is smaller.

  • Die4Ever@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    this is the bash script I use to create backups

    #! /bin/bash
    # https://join-lemmy.org/docs/administration/backup_and_restore.html#a-sample-backup-script
    now=$(date +"%Y-%m-%d_%H.%M.%S")
    
    cd ~/lemmy && (docker-compose exec -T postgres pg_dumpall -c -U lemmy 1> dump.sql 2> dump.errors)
    cd ~/lemmy && zip -r9 ~/bak-lemmy-$now.zip ./ --exclude "volumes/postgres/*"
    rm -f ~/lemmy/dump.sql
    

    it creates very small zip files as a result so it’s very efficient

    I made a cron for it to run every 3 hours, like

    0 */3 * * * ~/lemmy/backup.sh