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
gefragt vor 8 Monaten68 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen