Advertisement
heimi

ssh for various backup tasks

May 16th, 2013
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.46 KB | None | 0 0
  1. zcat hdc2.gz | pv | ssh root@host "dd of=/dev/hdc2"
  2. ssh host "cd /source && tar cf - ." | tar tvf -
  3. tar cf - --one-file-system . | pv | ssh host "cd /target && tar --same-owner -p -xf -"
  4. # tarbridge:
  5. tar -c -f - <local_file> | ssh <user>@<ip-address> "(cd /remomepath>; tar -x -f -)"
  6. ssh host "cd target && cat > file.tmp && mf file.tmp real.name" < local.file
  7. ssh host "cd /target; tar txvf -" < local.tgz
  8. ssh hassbian "tar cf - -T /run/backup.files" > hassbian.tar
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement