diff --git a/wp/quick/sync-images-to-s3.sh b/wp/quick/sync-images-to-s3.sh new file mode 100755 index 0000000..97d5d64 --- /dev/null +++ b/wp/quick/sync-images-to-s3.sh @@ -0,0 +1,10 @@ +#!/bin/bash +CAPTAIN_SERVER=cap.server +CAPTAIN_DESTINATION_S3_SERVICE=site-files +CAPTAIN_SOURCE_WORDPRESS_SERVICE=site +BUCKET=media + +SRC="/var/lib/docker/volumes/captain--${CAPTAIN_SOURCE_WORDPRESS_SERVICE}-wp-data/_data/wp-content/uploads/" +DESTINATION="/var/lib/docker/volumes/captain--${CAPTAIN_DESTINATION_S3_SERVICE}-db-data/_data/${BUCKET}/" + +ssh root@$CAPTAIN_SERVER "rsync -a --info=progress2 ${SRC} ${DESTINATION}"