1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
1
Kindly first refer to the use of include & exclude filters as referred in link below... https://docs.aws.amazon.com/cli/latest/reference/s3/index.html#use-of-exclude-and-include-filters
Not sure if formatting is showing the folder structure is showing up correctly, but if it is like following ..
2022-06-27/db_name_1/db_name_1-2022-06-27-22-35.sql.gz
2022-06-27/db_name_2/db_name_2-2022-06-27-22-35.sql.gz
2022-06-27/db_name_3/db_name_3-2022-06-27-22-35.sql.gz
2022-06-28/db_name_1/db_name_1-2022-06-28-22-35.sql.gz
2022-06-28/db_name_2/db_name_2-2022-06-28-22-35.sql.gz
2022-06-28/db_name_3/db_name_3-2022-06-28-22-35.sql.gz
then you can try this
aws s3 cp . s3://<your_target_bucket_name/<prefix>/ --recursive --exclude "*" --include "*/db_name_1/db_name_*.sql.gz"
You can try with specific database name as above or asterick if you want them all. As always try with small set of files to test the code to meet your needs.
répondu il y a 2 ans
Contenus pertinents
- demandé il y a un an
- demandé il y a 7 mois
- Réponse acceptéedemandé il y a un an
- demandé il y a 2 mois
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 7 mois
- AWS OFFICIELA mis à jour il y a 3 mois