Skip to content

Instantly share code, notes, and snippets.

@nzoschke
Last active December 15, 2016 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nzoschke/6ee4817ce7800c639183a21213030ad8 to your computer and use it in GitHub Desktop.
Save nzoschke/6ee4817ce7800c639183a21213030ad8 to your computer and use it in GitHub Desktop.
root@642dc10588ea:/var/www/html# find . -type f | wc -l
11035
root@642dc10588ea:/var/www/html# tar cfv /tmp/oc.tar --one-file-system -C /usr/src/owncloud .
root@642dc10588ea:/var/www/html# du -h /tmp/oc.tar
98M /tmp/oc.tar
root@642dc10588ea:/var/www/html# time tar cfv - --one-file-system -C /usr/src/owncloud . | tar xf - -k
real 0m36.628s
root@3ca68be0000d:/var/www/html# time rsync -v -a /usr/src/owncloud/ ./
...
sent 92,443,454 bytes received 214,821 bytes 151,278.82 bytes/sec
total size is 92,798,757 speedup is 1.00
real 10m12.542s
root@3ca68be0000d:/var/www/html# time rsync -v --ignore-existing -a /usr/src/owncloud/ ./
sending incremental file list
sent 252,592 bytes received 1,578 bytes 8,333.44 bytes/sec
total size is 92,798,757 speedup is 365.11
real 0m30.348s
root@3ca68be0000d:/var/www/html# cd /usr/src/owncloud
root@3ca68be0000d:/var/www/html# find . -name '*' > /tmp/files.txt
root@3ca68be0000d:/var/www/html# cd /tmp
root@3ca68be0000d:/var/www/html# split -l 5 files.txt
root@3ca68be0000d:/var/www/html# time find /tmp/ -name 'x*' | xargs -P 1000 -L 1 -I% rsync -av --files-from=% /usr/src/owncloud/ /var/www/html/
real 1m06.124s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment