Browse Source

+ quick helper for sync local files to s3 on same caprover server

master
dimti 2 years ago
parent
commit
a220fe9dd9
  1. 10
      wp/quick/sync-images-to-s3.sh

10
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}"
Loading…
Cancel
Save