S3 storage for Images #16

Closed
opened 2025-01-24 19:39:28 +00:00 by aknuth · 1 comment
Owner
No description provided.
Author
Owner

CLONE TO S3
rclone sync -P --transfers 10 --checkers 20 --retries 10 --low-level-retries 20 --s3-upload-concurrency 8 ./images/ haiky-s3:haiky/images/
or
rclone sync -P --transfers 10 ./images/ haiky-s3:haiky/images/

CLONE FROM S3
rclone sync -P haiky-s3:haiky/images/ ./restored-images/

CRON:

Cron-Eintrag für tägliche Synchronisierung um 2 Uhr

0 2 * * * /usr/bin/rclone sync -P --transfers 10 ./images/ haiky-s3:haiky/images/ > /var/log/rclone.log 2>&1

SCRIPT (sync_images.sh)
#!/bin/bash

BUCKET="haiky"
RCLONE_CONF="/path/to/rclone.conf"
LOG_FILE="/var/log/image-sync.log"

echo "$(date) Starting sync" >> $LOG_FILE

rclone sync -P
--log-file $LOG_FILE
--stats 1m
--exclude "*.tmp"
./images/ haiky-s3:$BUCKET/images/

echo "$(date) Sync completed" >> $LOG_FILE

CLONE TO S3 rclone sync -P --transfers 10 --checkers 20 --retries 10 --low-level-retries 20 --s3-upload-concurrency 8 ./images/ haiky-s3:haiky/images/ or rclone sync -P --transfers 10 ./images/ haiky-s3:haiky/images/ CLONE FROM S3 rclone sync -P haiky-s3:haiky/images/ ./restored-images/ CRON: # Cron-Eintrag für tägliche Synchronisierung um 2 Uhr 0 2 * * * /usr/bin/rclone sync -P --transfers 10 ./images/ haiky-s3:haiky/images/ > /var/log/rclone.log 2>&1 SCRIPT (sync_images.sh) #!/bin/bash BUCKET="haiky" RCLONE_CONF="/path/to/rclone.conf" LOG_FILE="/var/log/image-sync.log" echo "$(date) Starting sync" >> $LOG_FILE rclone sync -P \ --log-file $LOG_FILE \ --stats 1m \ --exclude "*.tmp" \ ./images/ haiky-s3:$BUCKET/images/ echo "$(date) Sync completed" >> $LOG_FILE
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: aknuth/vokabeltraining#16
No description provided.