BTCPay updates.
This commit is contained in:
parent
b3c3be4df1
commit
e8303a54a1
@ -11,7 +11,7 @@ echo "INFO: Starting BTCPAY Backup script for host '$BTCPAY_FQDN'."
|
|||||||
|
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
ssh "$BTCPAY_FQDN" "mkdir -p $REMOTE_HOME/backups; cd $REMOTE_DATA_PATH/; sudo BTCPAY_BASE_DIRECTORY=$REMOTE_DATA_PATH bash -c $BTCPAY_SERVER_APPPATH/btcpay-down.sh"
|
ssh "$BTCPAY_FQDN" "mkdir -p $REMOTE_BACKUP_PATH; cd $REMOTE_DATA_PATH/; sudo BTCPAY_BASE_DIRECTORY=$REMOTE_DATA_PATH bash -c $BTCPAY_SERVER_APPPATH/btcpay-down.sh"
|
||||||
|
|
||||||
# TODO; not sure if this is necessary, but we want to give the VM additional time to take down all services
|
# TODO; not sure if this is necessary, but we want to give the VM additional time to take down all services
|
||||||
# that way processes can run shutdown procedures and leave files in the correct state.
|
# that way processes can run shutdown procedures and leave files in the correct state.
|
||||||
@ -24,8 +24,8 @@ ssh "$BTCPAY_FQDN" "sudo cp $REMOTE_DATA_PATH/btcpay-backup.sh $BTCPAY_SERVER_AP
|
|||||||
ssh "$BTCPAY_FQDN" "cd $REMOTE_DATA_PATH/; sudo BTCPAY_BASE_DIRECTORY=$REMOTE_DATA_PATH BTCPAY_DOCKER_COMPOSE=$REMOTE_DATA_PATH/btcpayserver-docker/Generated/docker-compose.generated.yml bash -c $BTCPAY_SERVER_APPPATH/btcpay-backup.sh"
|
ssh "$BTCPAY_FQDN" "cd $REMOTE_DATA_PATH/; sudo BTCPAY_BASE_DIRECTORY=$REMOTE_DATA_PATH BTCPAY_DOCKER_COMPOSE=$REMOTE_DATA_PATH/btcpayserver-docker/Generated/docker-compose.generated.yml bash -c $BTCPAY_SERVER_APPPATH/btcpay-backup.sh"
|
||||||
|
|
||||||
# next we pull the resulting backup archive down to our management machine.
|
# next we pull the resulting backup archive down to our management machine.
|
||||||
ssh "$BTCPAY_FQDN" "sudo cp /var/lib/docker/volumes/backup_datadir/_data/backup.tar.gz $REMOTE_HOME/backups/btcpay.tar.gz"
|
ssh "$BTCPAY_FQDN" "sudo cp /var/lib/docker/volumes/backup_datadir/_data/backup.tar.gz $REMOTE_BACKUP_PATH/btcpay.tar.gz"
|
||||||
ssh "$BTCPAY_FQDN" "sudo chown ubuntu:ubuntu $REMOTE_HOME/backups/btcpay.tar.gz"
|
ssh "$BTCPAY_FQDN" "sudo chown ubuntu:ubuntu $REMOTE_BACKUP_PATH/btcpay.tar.gz"
|
||||||
|
|
||||||
# if the backup archive path is not set, then we set it. It is usually set only when we are running a migration script.
|
# if the backup archive path is not set, then we set it. It is usually set only when we are running a migration script.
|
||||||
BTCPAY_LOCAL_BACKUP_PATH="$SITES_PATH/$PRIMARY_DOMAIN/backups/btcpayserver"
|
BTCPAY_LOCAL_BACKUP_PATH="$SITES_PATH/$PRIMARY_DOMAIN/backups/btcpayserver"
|
||||||
@ -34,6 +34,6 @@ if [ -z "$BACKUP_BTCPAY_ARCHIVE_PATH" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "$BTCPAY_LOCAL_BACKUP_PATH"
|
mkdir -p "$BTCPAY_LOCAL_BACKUP_PATH"
|
||||||
scp "$BTCPAY_FQDN:$REMOTE_HOME/backups/btcpay.tar.gz" "$BACKUP_BTCPAY_ARCHIVE_PATH"
|
scp "$BTCPAY_FQDN:$REMOTE_BACKUP_PATH/btcpay.tar.gz" "$BACKUP_BTCPAY_ARCHIVE_PATH"
|
||||||
|
|
||||||
echo "INFO: Created backup archive '$BACKUP_BTCPAY_ARCHIVE_PATH' for host '$BTCPAY_FQDN'."
|
echo "INFO: Created backup archive '$BACKUP_BTCPAY_ARCHIVE_PATH' for host '$BTCPAY_FQDN'."
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
# we append this text to the btcpay server /home/ubuntu/.bashrc so
|
# these aliases are simply calling the btcpay server scripts.
|
||||||
# logged in users have more common access to the variou
|
alias bitcoin-cli="/home/ubuntu/ss-data/btcpayserver-docker/bitcoin-cli.sh $@"
|
||||||
|
alias lightning-cli="/home/ubuntu/ss-data/btcpayserver-docker/bitcoin-lightning-cli.sh $@"
|
||||||
alias bitcoin-cli="bitcoin-cli.sh $@"
|
|
||||||
alias lightning-cli="bitcoin-lightning-cli.sh $@"
|
|
||||||
|
|
||||||
|
@ -25,15 +25,6 @@ elif [ "$RESTORE_BTCPAY" = true ]; then
|
|||||||
|
|
||||||
./restore.sh
|
./restore.sh
|
||||||
|
|
||||||
RUN_SERVICES=true
|
|
||||||
BACKUP_BTCPAY=false
|
|
||||||
|
|
||||||
elif [ "$RECONFIGURE_BTCPAY_SERVER" == true ]; then
|
|
||||||
# the administrator may have indicated a reconfig;
|
|
||||||
# if so, we re-run setup script.
|
|
||||||
./stub_btcpay_setup.sh
|
|
||||||
|
|
||||||
RUN_SERVICES=true
|
|
||||||
BACKUP_BTCPAY=false
|
BACKUP_BTCPAY=false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -48,5 +39,3 @@ if [ "$STOP_SERVICES" = false ]; then
|
|||||||
# we bring the services back up by default.
|
# we bring the services back up by default.
|
||||||
ssh "$FQDN" "bash -c $BTCPAY_SERVER_APPPATH/btcpay-up.sh"
|
ssh "$FQDN" "bash -c $BTCPAY_SERVER_APPPATH/btcpay-up.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "FINISHED btcpayserver/go.sh"
|
|
||||||
|
@ -90,7 +90,7 @@ EOF
|
|||||||
. ./btcpay-setup.sh -i
|
. ./btcpay-setup.sh -i
|
||||||
|
|
||||||
touch ${REMOTE_DATA_PATH}/btcpay.complete
|
touch ${REMOTE_DATA_PATH}/btcpay.complete
|
||||||
|
chown ubuntu:ubuntu ${REMOTE_DATA_PATH}/btcpay.complete
|
||||||
EOL
|
EOL
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user