Skip to content

Instantly share code, notes, and snippets.

@jepio
Last active August 29, 2015 14:02
Show Gist options
  • Save jepio/fedc84c42136f0936c2d to your computer and use it in GitHub Desktop.
Save jepio/fedc84c42136f0936c2d to your computer and use it in GitHub Desktop.
Use rsync to archive your home folder.
#!/usr/bin/env bash
rsync -av --delete /home/user user@host:/home/user/backup/
# copy over ssh, with partial (interruption) support, progressbar
rsync -avPh --rsh='ssh' src dest
@jepio
Copy link
Author

jepio commented Jun 21, 2014

-av is archive and verbose.
--delete deletes files from the destination that were deleted in from the source.

@jepio
Copy link
Author

jepio commented Jun 21, 2014

Note to self: make a habit of doing this. OFTEN!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment