in reply to SCP file size greater than 2GB
In my experience the combination of tar and ssh is much faster than scp if you are copying many small files. If your system is more current, your tar might also provide different compression methods like -j or -J:tar czf - SOURCE_DIR | ssh USER@REMOTE_HOST "cd REMOTE_DIR; tar xzf -" # or if the tar is sufficient on the other side: tar czf - SOURCE_DIR | ssh USER@REMOTE_HOST "cat >REMOTE_DIR/backup.tg +z"
bzip2 and xz will usually reach higher compression levels than gzip. They require however more cpu and ram, and the compression will be slower. In my experience one can achieve the highest compression with xz (-J). If space/bandwidth matters more than (cpu-/real-)time and RAM, you might try stronger compression methods. For most cases gzip will however also be good enough and quite fast.-j, --bzip2 filter the archive through bzip2 -J, --xz filter the archive through xz -z, --gzip, --gunzip --ungzip filter the archive through gzip
To skip files, use -X:-T, --files-from FILE get names to extract or create from FILE
If you want a graphical progress you can combine it with pv (you might have to install it first). E.g.:-X, --exclude-from FILE exclude patterns listed in FILE
tar czf - SOURCE_DIR | pv | ssh USER@REMOTE_HOST "cd REMOTE_DIR; tar x +zf -" # or if the tar is sufficient on the other side: tar czf - SOURCE_DIR | pv | ssh USER@REMOTE_HOST "cat >REMOTE_DIR/back +up.tgz"
|
|---|