TAR files over SCP on the fly


I struggle with no free space on VM to make tar backup of the assets of some random php application so I was wonder that I could copy locally necessary assets files and tar them up on the fly and here we are with the bash :
ssh rootuser@host tar czf - /folder1/folder2/assets > ./assets.tar

I hope thats can help to some one.
Thanks lot.

Leave a comment