How to copy all your repositories without node_modules with rsync.

January 23, 2018 · 1 minute read
Categories: How-To Tags: Node_modules Rsync Javascript

Sometimes when we are making backups on our files, and specially if you are a Node.js developer, you’ll suffer whilst copying your repositories to another place for making a backup. (Provided you don’t have git for all your repositories)

Just do:

 rsync -av --exclude 'node_modules' source destination

And you are set. You could also exclude some other things like adding adding gitignore rules

rsync -av --filter=":- .gitignore" source destination


This blog is open source, saw a typo? you can suggest a fix in the GitHub repository.