What is the purpose of KuduSync's nextManifest and previousManifest options?

Short Answer

From the README.md, KuduSync is a...

Tool for syncing files for deployment, will only copy changed files and delete files that [don't exist] in the destination but only if they were part of the previous deployment.

This advantage is that, when integrated with Git Deployment, KuduSync will only delete files that are in version control. It will NOT delete

This is a terrific feature. If a file or directory isn't under version control, KuduSync will never delete it. Hooray!

kudu-animal

This is a Kudu. It's a type of African antelope. Those ears are as large as the head. I guess that means Microsoft is listening.

Read the Source

KuduSync has sparse documentation. So to learn the above, I stepped through the source code as follows.

Demo Command Line Parameters

-t C:\temp\kuduToDir -f C:\temp\kuduFromDir -n C:\temp\kuduManifest01.txt -p C:\temp\kuduManifest02.txt --verbose

image

--previousManifest

The --previousManifest option provides that path to a file that lists all the files that were part of the previous deployment. That tells KuduSync whether it can delete them or not.

Here are some notes on the source code.

[KuduSync ]will only ... delete files that [don't exist] in the destination but only if they were part of the previous deployment. (emphasis added)

So that's what the --previousManifest option does. It lists the files that were part of the previous deployment, so that KuduSync knows whether they are okay to delete.

--nextManifest

--nextManifest provides a file to which we can save a list of the files and subdirectories in the deployment. Then, we can pass that file path as the --previousManifest option the next time we run KuduSync.