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ビュー
回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ