Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync overrides the container during the first run #79

Closed
artemuwka opened this issue Oct 9, 2018 · 5 comments
Closed

Sync overrides the container during the first run #79

artemuwka opened this issue Oct 9, 2018 · 5 comments
Assignees

Comments

@artemuwka
Copy link
Contributor

artemuwka commented Oct 9, 2018

So sync works correctly with sastoken but whatever is in the container prior to the first sync gets deleted/overridden. Can we append instead?

BTW: during the 1st run sync detected 5 files in the folder although there was just 2 (which was correctly reflected in the container after the sync). I then deleted 1 file and ran the sync again and that time it correctly detected 1 file and correctly deleted 1 file from the container.

PS C:\Users\artek\Desktop\OneDrive - Microsoft\Current tasks\PowerShell & CLI & AzCopy\azcopy_windows_amd64_10.0.1> .\azcopy sync "C:\azcopy" "https://akzrsdemo.blob.core.windows.net/aktest?sv=RSv%2BW5Y%3D" --recursive=true

Job 08599522-c810-624a-6d48-faf60bd9ba7d has started

08599522-c810-624a-6d48-faf60bd9ba7d.log file created in C:\Users\artek/.azcopy
0 Done, 0 Failed, 5 Pending, 0 Skipped, 5 Total, 2-sec Throughput (Mb/s): 0

Job 08599522-c810-624a-6d48-faf60bd9ba7d summary
Elapsed Time (Minutes): 0.0334
Total Number Of Transfers: 5
Number of Transfers Completed: 5
Number of Transfers Failed: 0
Number of Transfers Skipped: 0
TotalBytesTransferred: 15612824
Final Job Status: Completed

PS C:\Users\artek\Desktop\OneDrive - Microsoft\Current tasks\PowerShell & CLI & AzCopy\azcopy_windows_amd64_10.0.1> .\azcopy sync "C:\azcopy" "https://akzrsdemo.blob.core.windows.net/aktest?sv=Y%3D" --recursive=true

Job 1f756979-1816-dd4f-4af4-db129ae90cc2 has started

1f756979-1816-dd4f-4af4-db129ae90cc2.log file created in C:\Users\artek/.azcopy
0 Done, 0 Failed, 1 Pending, 0 Skipped, 1 Total, 2-sec Throughput (Mb/s): 0

Job 1f756979-1816-dd4f-4af4-db129ae90cc2 summary
Elapsed Time (Minutes): 0.0333
Total Number Of Transfers: 1
Number of Transfers Completed: 1
Number of Transfers Failed: 0
Number of Transfers Skipped: 0
TotalBytesTransferred: 14944
Final Job Status: Completed

@prjain-msft
Copy link
Contributor

For the first time, when you ran the sync command, how many files were there in you container aktest before running the sync command.

@seguler
Copy link
Contributor

seguler commented Oct 9, 2018

@prjain-msft this is per the design. There were pre-existing files in the container.. Then wanted to copy a completely new folder to the container using sync command.. And of course all files in the container which did not exist in the local filesystem got deleted... This is per design... But users won't know this design until after they lose their data. Bottom line, can we have a warning, or a yes/no question before we do what we do (delete files in the destination that does not exist in source) ?

@prjain-msft
Copy link
Contributor

prjain-msft commented Oct 9, 2018

We can do that. Print a warning message and ask for you user decision to delete the existing blobs or not.
I will add the task and work on it. But will this question be by default printed for every sync operation or will be printed only if there are existing blobs in the destination ?

@Kapanther
Copy link

Possibly this would only be required if no files/folders from the source existed in the destination? Or perhaps this could be a flag --prompt-delete=true <default=false> If you have scripts that utilize azcopy it would be very annoying for them to be held up by a prompt.

@zezha-msft
Copy link
Contributor

This is now fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants