Conversation
Notices
-
Embed this notice
snacks (snacks@netzsphaere.xyz)'s status on Sunday, 02-Feb-2025 01:43:38 JST snacks
Has anyone set up pleroma/akkoma with backblaze b2? -
Embed this notice
snacks (snacks@netzsphaere.xyz)'s status on Sunday, 02-Feb-2025 01:52:10 JST snacks
like, i'm starting to think b2 just doesn't work at all -
Embed this notice
snacks (snacks@netzsphaere.xyz)'s status on Sunday, 02-Feb-2025 01:54:19 JST snacks
@meso yes, the s3 api doesn't work for some reason. you prob just fucked up your fe -
Embed this notice
meso [netzsphaere era] (meso@netzsphaere.xyz)'s status on Sunday, 02-Feb-2025 01:54:21 JST meso [netzsphaere era]
@snacks >go on asbestos
>errors out or takes 10 minutes to upload my faggot shit
>go on netzsphaere
>doesnt even give me an error and refuses to upload -
Embed this notice
snacks (snacks@netzsphaere.xyz)'s status on Sunday, 02-Feb-2025 01:54:35 JST snacks
@meso try reloading the page -
Embed this notice
kaia (kaia@brotka.st)'s status on Sunday, 02-Feb-2025 05:27:42 JST kaia
@snacks we only use it for backup, not for media, and it works okie. snacks likes this. -
Embed this notice
snacks (snacks@netzsphaere.xyz)'s status on Sunday, 02-Feb-2025 05:28:42 JST snacks
@kaia what program do you use? s3cmd has issues with backblaze it seems -
Embed this notice
kaia (kaia@brotka.st)'s status on Sunday, 02-Feb-2025 05:31:50 JST kaia
@snacks the b2 command
#!/bin/bash BACKUP_DIR="/opt/akkoma/backup" BUCKET_NAME="brotkastbackup" DATE=$(date +%Y%m%d) BACKUP_FILE="$DATE-akkoma.pgdump" ENCRYPTED_FILE="${BACKUP_FILE}.enc" SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" export B2_APPLICATION_KEY_ID="" export B2_APPLICATION_KEY="" # Your encryption key - store this securely! ENCRYPTION_KEY="" # Stop docker compose docker compose stop docker compose up db -d # Create backup docker compose exec db pg_dump -d akkoma --format=custom -f ./backup/$BACKUP_FILE # Start docker compose again docker compose up akkoma -d # Encrypt the backup openssl enc -aes-256-cbc -salt -in "$BACKUP_DIR/$BACKUP_FILE" -out "$BACKUP_DIR/$ENCRYPTED_FILE" -k "$ENCRYPTION_KEY" -pbkdf2 # Upload encrypted file to B2 if $SCRIPT_DIR/venv/bin/b2 file upload $BUCKET_NAME "$BACKUP_DIR/$ENCRYPTED_FILE" "backups/$ENCRYPTED_FILE"; then # Delete local files only if upload was successful # rm "$BACKUP_DIR/$BACKUP_FILE" "$BACKUP_DIR/$ENCRYPTED_FILE" echo "Backup completed, encrypted, and uploaded successfully" else echo "Upload failed - keeping local backup files" exit 1 fisnacks likes this. -
Embed this notice
Phantasm (phnt@fluffytail.org)'s status on Monday, 03-Feb-2025 06:26:00 JST Phantasm
docker compose exec db pg_dump -d akkoma --format=custom -f ./backup/$BACKUP_FILE
If I remember correctly, you had some problems with long restore times for the Akkoma DB when you were moving away from Contabo. This line is the source of the problem. The custom format has issues with some indexes and by default does not disable triggers when restoring, which makes PostgreSQL do a lot of unneeded work. Disabling triggers might work with the custom format, but I never tested it properly.
This is what currently use on PostgreSQL 12:
=== schema === sudo -Hu postgres pg_dump -s pleroma -S postgres -v -f /mnt/backup/pleroma-schema.psql === data === pg_dump -a pleroma --disable-triggers -S postgres -v -f - | nice bzip2 -z9 - >/mnt/backup/pleroma-data.psql.bz2 (must be ran as the postgres user, due to write permission for backup directory)Restoration is then done with psql instead of pg_restore.
-
Embed this notice
kaia (kaia@brotka.st)'s status on Monday, 03-Feb-2025 07:00:18 JST kaia
@phnt @snacks
thank you, bookmarking
-
Embed this notice