How to backup (tar) to remote machine

I've found two cases in which you need to do tar this way: - you don't have space on your machine - you don't trust the machine operator or you want to store backups on other machine What to do then?

The answer is simple - use tar over ssh session like below: tar with gzip compression
 tar zcvf - /my_data | ssh user@remote.optilabs.eu "cat > /backup/my_data.tar.gz" 
tar with bzip2 compression
 tar jcvf - /my_data | ssh user@remote.optilabs.eu "cat > /backup/my_data.tar.gz"

Comments

wrote

Umm, are you really just gvinig this info out for nothing?

Comment