TGZ over SSH copy - /dev/xvda

Hi

I'm trying to download my Linode but not being on the quickest connection I think I need to compress the file and split it into chunks.

I'm unsure of how to do this exactly but remember seeing a post about it before (I have searched but cannot find the post).

I expect others at some point will probably want to do the same thing.

So far the command I have which works but is obviously very slow is:

ssh root@[Linode IP] "dd if=/dev/xvda " | dd of=/home/archive/linode.img

Can someone please let me know the command that I need to used to do the following in one step:

1) Compress the file that I am going to copy over ssh

2) Splits the file into chunks of say 1.8gb

For the benefit of others at a later who think this may be what they also wish to do this thread relates to:

http://library.linode.com/migration/ssh-copy

3 Replies

You really just want gz, not tgz since there's no reason to tar up a single file.

using your existing paths:

ssh root@linode "dd if=/dev/xvda" | gzip > /home/archive/linode.img.gz

should work

Thanks gig

Is there a way that I can splitt the .gz file into chunks of 1.8gb using the same command?

I had a look at the manual for Gzip and I don't see anything about this.

Finnix reports :

no such file or directory error using the gzip command posted.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct