Skip to content

Instantly share code, notes, and snippets.

@domwom
Created April 26, 2010 08:41
Show Gist options
  • Save domwom/379108 to your computer and use it in GitHub Desktop.
Save domwom/379108 to your computer and use it in GitHub Desktop.
ssh tar rsync
## From the server
# Untar at destination
tar -czf - /some/file | ssh host.name tar -xzf - -C /destination
# Save as tarball
tar -czpv /path/to/stuff/that/we/backup | ssh user@backup.server "dd of=/path/to/where/my/backup/goes/on/the/server/backup.tar.gz"
## From Remote
ssh remoteuser@my.client.that.needs.a.backup "tar cvpz  /path/to/backup"  > ./remoteclient-backup.tar.gz
## SCP but dont follow symlinks
rsync -azuv -e ssh peng:/dire/to/copy .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment