rsync -a --exclude "node_modules" /home/user/project/ /mnt/backup/project/

Category: Backup & Restore

rsync -a --exclude "node_modules" /home/user/project/ /mnt/backup/project/

Back up a project without node_modules

Archives /home/user/project while skipping the --exclude pattern node_modules, keeping the backup small and fast. The -a flag preserves permissions, timestamps and symlinks. Add more --exclude flags or an --exclude-from file for bigger ignore lists.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.