mirror of
https://codeberg.org/hyperreal/techne
synced 2024-11-01 14:23:06 +01:00
25 lines
817 B
Org Mode
25 lines
817 B
Org Mode
|
#+title: Parallel
|
||
|
#+setupfile: ../org-templates/page.org
|
||
|
|
||
|
** Pulling files from remote server with rsync
|
||
|
To transfer just the files:
|
||
|
#+BEGIN_SRC bash
|
||
|
ssh user@remote -- find /path/to/parent/directory -type f | parallel -v -j16 rsync -Havessh -aAXP user@remote:{} /local/path
|
||
|
#+END_SRC
|
||
|
|
||
|
To transfer the entire directory:
|
||
|
#+BEGIN_SRC bash
|
||
|
echo "/path/to/parent/directory" | parallel -v -j16 rsync -Havessh -aAXP user@remote:{} /local/path
|
||
|
#+END_SRC
|
||
|
|
||
|
** Pushing files to remote server with rsync
|
||
|
To transfer just the files:
|
||
|
#+BEGIN_SRC bash
|
||
|
find /path/to/local/directory -type f | parallel -v -j16 -X rsync -aAXP /path/to/local/directory/{} user@remote:/path/to/dest/dir
|
||
|
#+END_SRC
|
||
|
|
||
|
** Running the same command on multiple remote hosts
|
||
|
#+BEGIN_SRC bash
|
||
|
parallel --tag --nonall -S remote0,remote1,remote2 uptime
|
||
|
#+END_SRC
|