Wednesday, 9 May 2018

How to backup of wordpress into S3?

How to backup of wordpress into S3?

Question: How to Store the backup of wordpress into S3?
aws s3 cp /var/www/html s3://website-bucket-akg/wordpress/ --recursive



Question: How to upload images in S3?
 aws s3 cp --recursive /var/www/html/wp-content/uploads s3://cloud-front-s3/wp-media



Question: How to Upload images to S3 Sync?
Lets test with --dryrun, first
aws s3 sync --delete /var/www/html/wp-content/uploads s3://cloud-front-s3/wp-media --dryrun


Now Run the command
aws s3 sync --delete /var/www/html/wp-content/uploads s3://cloud-front-s3/wp-media



Question: How to sync the images with S3 with help of cron?
*/3 * * * * aws s3 sync --delete /var/www/html/wp-content/uploads s3://cloud-front-s3/wp-media >> /var/www/html/cron/cron.log 2>&1

It run every 3 mins.


No comments :

Post a Comment