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
已提問 8 個月前檢視次數 67 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南