Cov txheej txheem:

S3 sync ua haujlwm li cas?
S3 sync ua haujlwm li cas?

Video: S3 sync ua haujlwm li cas?

Video: S3 sync ua haujlwm li cas?
Video: Footloose dance ua 2024, Hlis ntuj nqeg
Anonim

Cov synchronization hais kom ua synchronization directory rau S3 thoob los yog prefixes thiab vice versa. Nws recursively luam cov ntaub ntawv tshiab thiab hloov tshiab los ntawm qhov chaw (Cov Ntawv Teev Npe lossis Lub Thawv / Cov Lus Qhia Ua Ntej) mus rau qhov chaw (Cov Ntawv Teev Npe lossis Lub Thawv / Ua Ntej). Nws tsuas yog tsim cov folders hauv qhov chaw yog tias lawv muaj ib lossis ntau cov ntaub ntawv.

Ib yam li ntawd, koj tuaj yeem nug, AWS s3 sync ua haujlwm li cas?

S3 muaj thoob thiab khoom. S3 Cov khoom nrog kev pab ntawm prefixes paub zoo li ib phau ntawv. Yog li ntawd, thaum aws s3 sync yog siv los upload cov ntsiab lus rau S3 thoob, khoob directory yog ignored ad tsis muaj dab tsi yog uploaded. Thaum cov ntaub ntawv khoob muaj cov ntaub ntawv nyob hauv, lawv yuav raug xa mus.

Tsis tas li ntawd, kuv yuav sync ob lub thoob s3 li cas? Luam S3 thoob cov khoom hla AWS accounts

  1. Yam yuavtsum tau kawm uantej.
  2. Kauj ruam 1: Tau txais 12 tus lej lo lus uas peb AWS account naj npawb. Nkag mus rau qhov chaw AWS account.
  3. Kauj ruam 2: Teeb qhov chaw S3 thoob. Nkag mus rau qhov chaw AWS account.
  4. Kauj ruam 3: Teeb qhov chaw S3 thoob.
  5. Kauj ruam 4: Txuas txoj cai rau IAM neeg siv nyob rau hauv lo lus uas peb AWS account.
  6. Kauj ruam 5: Sync S3 cov khoom mus rau qhov chaw.
  7. Xaus.

Xav txog qhov no, puas s3 sync rho tawm cov ntaub ntawv?

2 Teb. Los ntawm default, lub aws sync hais kom ua (saib cov ntaub ntawv) ua tsis yog rho tawm cov ntaub ntawv . Nws tsuas yog luam tawm tshiab lossis hloov kho cov ntaub ntawv mus rau qhov chaw. Kev siv cov-- rho tawm kev xaiv deletes cov ntaub ntawv uas muaj nyob hauv qhov chaw tab sis tsis nyob hauv qhov chaw.

Yuav ua li cas hloov los ntawm s3 mus rau s3?

Txhawm rau luam cov khoom los ntawm ib lub thoob S3 mus rau lwm qhov, ua raws li cov kauj ruam no:

  1. Tsim ib lub thoob tshiab S3.
  2. Install and configure AWS Command Line Interface (AWS CLI).
  3. Luam cov khoom nruab nrab ntawm S3 thoob.
  4. Xyuas kom meej tias cov khoom raug theej.
  5. Hloov kho API tam sim no hu rau lub thoob lub npe tshiab.

Pom zoo: