rsync -avz --exclude='node_modules' /app/ user@remote:/backup/app/

Category: Self-Hosting

rsync -avz --exclude='node_modules' /app/ user@remote:/backup/app/

Sync a directory to remote while excluding node_modules or other large unneeded folders

Excludes specific directories from the sync. Exclude node_modules and .git to keep backups small and fast.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.