I'm renting a couple of VPS with Ubuntu, and I've managed to fill-up one of them. Here I've got several directories with lots of files I'd like to put into an archive. Unfortunately, I don't have room enough to create such an archive (not even as root).
I was therefor wondering if it's possible to use tar (preferred) or cpio to create the archive on the other VPS? I'll want to compress the archive, so either calling tar
with the j-option (bzip2) or piping the file to bzip2
at some point (preferably before sending it over the network) - any suggestions as to how I best can compress the file?
Finally, both VPS got ssh and sshd installed, so I was thinking of using it for the transmission of the file.
+++
Unfortunately I'm not an expert in using tar/cpio or ssh in this way, so I'm a bit out of my depth as to something like this can (best) be accomplished. How should I use ssh
? Like tunnel or pipe, like ftp, like scp? How should I use tar
? Have tar
running on both VPS, with a ssh-tunnel between them? Run tar on the source-VPS, tunnel the result and redirect the result to a file on the destination-VPS?
So how can I do this?
Are there other - better - way to do something like this? Some special-purpose package? Using network-sockets? Something else?
sshfs
is the first thing that comes to my mind