scp file copy with on-line compression

This might come handy if you need to copy a database file (Data.fs) from the remote server to your local computer:

scp -C -o CompressionLevel=9 user@yoursite.com:~/plonefolder/zinstance/var/filestorage/Data.fs .

This command line enables real-time compression with the highest compression level. This speeds up copying somewhat, as ZODB database compresses pretty well.

\"\" Subscribe to RSS feed Follow me on Twitter Follow me on Facebook Follow me Google+

3 thoughts on “scp file copy with on-line compression

  1. Pingback: Anotaciones » Blog Archive » scp con compresión

  2. Pingback: Filecopy from remote server with SCP – Richard Choi

  3. I recently tried settings CompressionLevel to 9, but debug message always showed a CompressionLevel of 6.

    Looking at ‘man ssh_config’ explains:

    CompressionLevel
    Specifies the compression level to use if compression is enabled. The argument must be an integer from 1 (fast) to 9 (slow, best). The default level is 6, which is
    good for most applications. The meaning of the values is the same as in gzip(1). Note that this option applies to protocol version 1 only.

    Nevertheless a good hint to use compression if you copy a ZODB with scp.

Leave a Reply

Your email address will not be published. Required fields are marked *