diff --git a/content/docs/command-reference/list.md b/content/docs/command-reference/list.md index 9544e26bc3..4a24c0c962 100644 --- a/content/docs/command-reference/list.md +++ b/content/docs/command-reference/list.md @@ -125,3 +125,31 @@ images/dvc-logo-outlines.png.dvc images/owl_sticker.png ... ``` + +## Example: Create an archive of you DVC project + +Just like you can use `git archive` to make a quick bundle (ZIP) file of the +current code, `dvc list` can be easily complemented with simple archive tools to +bundle the current data files in the project. + +For example, here's a TAR archive of the entire workspace +(Linux/GNU): + +```dvc +$ dvc list . -R | tar -cvf project.tar +``` + +Or separate ZIP archives of code and DVC-tracked data (POSIX terminal with +`zip`): + +``` +$ git archive -o code.zip HEAD +$ dvc list . -R --dvc-only | zip -@ data.zip +``` + +ZIP alternative for [POSIX on Windows](/doc/user-guide/running-dvc-on-windows) +(Python installed): + +```dvc +$ dvc list . -R --dvc-only | xargs python -m zipfile -c data.zip +```