Rewrite paths during S3 bucket to local sync from versionned folders to non-versionned same filesystem

0

Hi there,

I need to sync a WordPress uploads directory from an S3 bucket towards a dev/local server.

On S3, the uploads have a version folder on top of the standard /wp-content/uploads/20**/**/file.* uploads folder architercture.

I know I can sync S3 to local with the AWS CLI following command: "aws s3 sync s3://your-bucket-name my-local-dir"

However, is there a way to sync the data while removing the versionNumber part in the following path:

/wp-content/uploads/20**/**/*versionNumber*/file.* 

... so that the files rather land as...

/wp-content/uploads/20**/**/file.*

... which is the expected file structure whithout the version s3 bucket folder layer.

Thanks!

Tngml
asked 7 months ago65 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions