Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tar + rsync + untar
- tar (from src to dest) + untar
- rsync
- tar -C /src/dir -jcf - ./ | ssh user@server 'tar -C /dest/dir -jxf -'
- scp -Cr srcdir user@server:destdir
- mkdir tmp; cd tmp
- for i in {1..5000}; do dd if=/dev/urandom of=file$i count=1 bs=10k; done
- time rsync -r tmp server:tmp2
- real 0m11.520s
- user 0m0.940s
- sys 0m0.472s
- time (tar cf demo.tar tmp; rsync demo.tar server: ; ssh server 'tar xf demo.tar; rm demo.tar'; rm demo.tar)
- real 0m15.026s
- user 0m0.944s
- sys 0m0.700s
- wc -l rsync.log rsync+tar.log
- 36730 rsync.log
- 37962 rsync+tar.log
- 74692 total
- 1a/ tar files from source machine over the network to a .tar file on remote machine
- $ tar cf /mnt/backup/cache.tar ~/.cache
- 1b/ untar that tar file on the remote machine itself
- $ ssh admin@nas_box
- [admin@nas_box] $ tar xf cache.tar
- 2/ rsync files from source machine over the network to remote machine
- $ mkdir /mnt/backup/cachetest
- $ rsync -ah .cache /mnt/backup/cachetest
- 1a - 33 seconds
- 1b - 1 minutes 48 seconds
- 2 - 22 minutes
- tar cf - ~/.cache | ssh admin@nas_box "(cd /destination ; tar xf -)"
- rsync --compress --stats --no-blocking-io --files-from=fileList.txt -av otherSystem:/the/other/dir/ dest/
- ssh otherSystem "cd /the/other/dir/; tar cf - ." | tar xvf -
- Host otherSystem
- Hostname dataSource.otherSide.com
- User myUser
- Port 22
- ProxyCommand ssh -q -W %h:%p intermediary.otherSide.com
- IdentityFile id_rsa.priv
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement