-
Notifications
You must be signed in to change notification settings - Fork 212
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
Comments
For the first time, when you ran the sync command, how many files were there in you container aktest before running the sync command. |
@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) ? |
We can do that. Print a warning message and ask for you user decision to delete the existing blobs or not. |
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. |
This is now fixed. |
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
The text was updated successfully, but these errors were encountered: