Simplify file sync issues.
This commit is contained in:
commit
5260567a18
@ -44,7 +44,7 @@ if ! lxc list --format csv | grep -q "$LXD_VM_NAME"; then
|
|||||||
# # attach any volumes
|
# # attach any volumes
|
||||||
# for CHAIN in testnet mainnet; do
|
# for CHAIN in testnet mainnet; do
|
||||||
# for DATA in blocks chainstate; do
|
# for DATA in blocks chainstate; do
|
||||||
# MOUNT_PATH="/$CHAIN/$DATA"
|
# MOUNT_PATH="/$CHAIN-$DATA"
|
||||||
# if lxc storage volume list ss-base -q --format csv -c n | grep -q "$CHAIN-$DATA/snap0"; then
|
# if lxc storage volume list ss-base -q --format csv -c n | grep -q "$CHAIN-$DATA/snap0"; then
|
||||||
# lxc storage volume attach ss-base "$CHAIN-$DATA" "$LXD_VM_NAME" "$MOUNT_PATH"
|
# lxc storage volume attach ss-base "$CHAIN-$DATA" "$LXD_VM_NAME" "$MOUNT_PATH"
|
||||||
# fi
|
# fi
|
||||||
|
@ -14,16 +14,5 @@ fi
|
|||||||
ssh "$PRIMARY_WWW_FQDN" sudo PASSPHRASE="$DUPLICITY_BACKUP_PASSPHRASE" duplicity "$REMOTE_SOURCE_BACKUP_PATH" "file://$REMOTE_BACKUP_PATH"
|
ssh "$PRIMARY_WWW_FQDN" sudo PASSPHRASE="$DUPLICITY_BACKUP_PASSPHRASE" duplicity "$REMOTE_SOURCE_BACKUP_PATH" "file://$REMOTE_BACKUP_PATH"
|
||||||
ssh "$PRIMARY_WWW_FQDN" sudo chown -R ubuntu:ubuntu "$REMOTE_BACKUP_PATH"
|
ssh "$PRIMARY_WWW_FQDN" sudo chown -R ubuntu:ubuntu "$REMOTE_BACKUP_PATH"
|
||||||
|
|
||||||
SSHFS_PATH="/tmp/sshfs_temp"
|
# sync the remote backup path down
|
||||||
mkdir -p "$SSHFS_PATH"
|
rsync -a "$PRIMARY_WWW_FQDN:$REMOTE_BACKUP_PATH/" "$LOCAL_BACKUP_PATH/"
|
||||||
|
|
||||||
# now let's pull down the latest files from the backup directory.
|
|
||||||
# create a temp directory to serve as the mountpoint for the remote machine backups directory
|
|
||||||
sshfs "$PRIMARY_WWW_FQDN:$REMOTE_BACKUP_PATH" "$SSHFS_PATH"
|
|
||||||
|
|
||||||
# rsync the files from the remote server to our local backup path.
|
|
||||||
rsync -av "$SSHFS_PATH" "$LOCAL_BACKUP_PATH"
|
|
||||||
|
|
||||||
# step 4: unmount the SSHFS filesystem and cleanup.
|
|
||||||
umount "$SSHFS_PATH"
|
|
||||||
rm -rf "$SSHFS_PATH"
|
|
||||||
|
@ -8,9 +8,9 @@ DOCKER_HOST="ssh://ubuntu@$PRIMARY_WWW_FQDN"
|
|||||||
export DOCKER_HOST="$DOCKER_HOST"
|
export DOCKER_HOST="$DOCKER_HOST"
|
||||||
|
|
||||||
# prepare clams images and such
|
# prepare clams images and such
|
||||||
./prepare_clams.sh
|
#./prepare_clams.sh
|
||||||
|
|
||||||
# Create the nginx config file which covers all domains.
|
# Create the nginx config file which covers all domainys.
|
||||||
bash -c ./stub/nginx_config.sh
|
bash -c ./stub/nginx_config.sh
|
||||||
|
|
||||||
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
|
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
|
||||||
|
Loading…
Reference in New Issue
Block a user