rsync -avz user@backup.example.com:/backup/data/ /home/user/restore/

Category: Backup & Restore

rsync -avz user@backup.example.com:/backup/data/ /home/user/restore/

Pull files from a remote host

Downloads /backup/data/ from the remote machine into /home/user/restore/, the reverse direction of a push. Useful for restoring from an offsite backup server or fetching files while travelling. Add --delete to mirror the remote exactly.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.