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

Add clarification in docs for --dry-run when using alongside --overwrite=false #1904

Closed
torresalyssa opened this issue Sep 22, 2022 · 4 comments
Assignees
Labels
Milestone

Comments

@torresalyssa
Copy link

Which version of the AzCopy was used?

10.16.0

Which platform are you using? (ex: Windows, Mac, Linux)

Linux

What command did you run?

azcopy copy 'https://<source-storage-account-name>.file.core.windows.net/<SAS-token>' 'https://<source-storage-account-name>.blob.core.windows.net/<SAS-token>' --recursive --overwrite=false --dry-run

What problem was encountered?

The --dry-run option does not produce accurate information according to the docs when using --overwrite=false. According to the docs, "--dry-run Prints the file paths that would be copied by this command. This flag doesn't copy the actual files." When using overwrite=false, the output of dry-run will still be all files in the source, not excluding any files that would be skipped because they won't get overwritten. It might be beneficial to clarify in the docs that dry-run prints the file paths that would be attempted to be copied by this command, and would not exclude files that would be skipped by things such as --overwrite=false.

How can we reproduce the problem in the simplest way?

Run any copy operation with --overwrite=false --dry-run.

Have you found a mitigation/solution?

I think the fix here is just adding additional clarification to the documentation for dry-run.

@nakulkar-msft nakulkar-msft added this to the 10.16.1 milestone Sep 27, 2022
@adreed-msft
Copy link
Member

Overwrite=false actually takes effect in the transfer engine, and not in the enumeration process, which would explain why this is happening.

@MetaHG
Copy link

MetaHG commented Mar 27, 2023

The flag "--overwrite" should be taken into account in a dry run, else it defies the usefulness of a dry run IMHO. The main selling point of a dry run is that it should behave exactly as the original command but without copying any files.
Additionally, a statistics summary of the files "transferred" in a dry run similar to the one printed at the end of a command run normally would be very useful to spot potential issues with the input command.

I hope this will be fixed in a future release.

@natedotzlaf
Copy link

Totally agree with this. Functionality of "dry-run" flag does not match expectations/definition. Documentation should be updated to call this out or the functionality should be modified (preferred).

natedotzlaf added a commit to natedotzlaf/azure-docs that referenced this issue Jun 15, 2023
'dry-run' functionality does not work as expected since it ignores '--overwrite=false'. This change makes sure users are aware of this limitation. For further details see Azure/azure-storage-azcopy#1904
@nakulkar-msft nakulkar-msft modified the milestones: 10.16.1, 10.20 Jun 15, 2023
@gapra-msft
Copy link
Member

This issue seems to have been resolved by the above docs PRs so I will close the issue. Please let us know if theres anything we missed on the docs end.

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

No branches or pull requests

6 participants