diff options
| author | Luke Hoersten <[email protected]> | 2020-02-09 12:08:03 -0600 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2020-02-09 12:08:03 -0600 |
| commit | c17f28aafd1f15a8c26835196956c1c209ec5ff3 (patch) | |
| tree | 471a2637b3d3b7551845af91c86be54586c2d2e5 /roles/pleroma-otp/files/pleroma-s3-backup.sh | |
| parent | 11746a2c064018a642486b208b2fdcaeae8ea8e5 (diff) | |
Moved roles to top level dir.
Diffstat (limited to 'roles/pleroma-otp/files/pleroma-s3-backup.sh')
| -rw-r--r-- | roles/pleroma-otp/files/pleroma-s3-backup.sh | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/roles/pleroma-otp/files/pleroma-s3-backup.sh b/roles/pleroma-otp/files/pleroma-s3-backup.sh deleted file mode 100644 index 7c1d6d3..0000000 --- a/roles/pleroma-otp/files/pleroma-s3-backup.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -INSTANCE=$1 -DATE=`date --iso-8601` - -BUCKET="pleroma-${INSTANCE//_/-}-backup" -BACKUP_DIR="/tmp/s3-backup/$BUCKET" -BACKUP_TAR="/tmp/s3-backup/$BUCKET-$DATE.tgz" - -DB_NAME="pleroma_$INSTANCE" -CONFIG="/etc/pleroma/$INSTANCE.config.exs" - -UPLOADS_DIR=`grep uploads $CONFIG | cut -d '"' -f 2` -STATIC_DIR=`grep static $CONFIG | cut -d '"' -f 2` - -mkdir -m 775 -p "$BACKUP_DIR/" -chown root:postgres "$BACKUP_DIR/" - -su postgres -c "pg_dump -d $DB_NAME --format=custom -f $BACKUP_DIR/$DB_NAME.pgdump" -cp $CONFIG "$BACKUP_DIR/" -cp -r $UPLOADS_DIR "$BACKUP_DIR/" -cp -r $STATIC_DIR "$BACKUP_DIR/" - -tar -zc -f $BACKUP_TAR $BACKUP_DIR -aws s3 mb "s3://$BUCKET/" -aws s3 cp $BACKUP_TAR "s3://$BUCKET/" |
