GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    kaia (kaia@brotka.st)'s status on Saturday, 30-Nov-2024 23:17:27 JSTkaiakaia

    does someone want to review our backup to backblaze script courtesy of ClaudeAI? seems to work!

    #!/bin/bash BACKUP_DIR="backup" BUCKET_NAME="" 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 down akkoma # Create backup docker compose exec db pg_dump -d akkoma --format=custom -f /backup/$BACKUP_FILE # Start docker compose again docker compose up akkoma # 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 fi
    In conversationabout 6 months ago from brotka.stpermalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.