Run Rsync for multiple files in parallel from 2 different directories and find elapsed time for each file and all files The Next CEO of Stack OverflowGNU parallel vs & (I mean background) vs xargs -Prsync list of files in sub-directories to remote server and delete extraneousrsync multiple files to multiple directoriesrsync hangs unless I defrag ext4 filesystemWhat is wrong with my init.d script [Segmentation fault]Copy multiple files from different directories while renaming?rsync multiple files from multiple directories in linuxrsync --update with symlinksStop rsync scheduled task race condition (large directory, small time interval)Why does adding -prune to my sync script cause rsync to do a DRY-RUN?How can I iterate through each line of a file using each line to replace a string in other files, creating a new file each time
Are there languages with no euphemisms?
How to write the block matrix in LaTex?
How should I support this large drywall patch?
If the heap is initialized for security, then why is the stack uninitialized?
Can a single photon have an energy density?
Is a stroke of luck acceptable after a series of unfavorable events?
Why did we only see the N-1 starfighters in one film?
Does it take more energy to get to Venus or to Mars?
Should I tutor a student who I know has cheated on their homework?
Is HostGator storing my password in plaintext?
Term for the "extreme-extension" version of a straw man fallacy?
What's the point of interval inversion?
How to make a variable always equal to the result of some calculations?
Increase performance creating Mandelbrot set in python
How do scammers retract money, while you can’t?
How to use tikz in fbox?
Why do professional authors make "consistency" mistakes? And how to avoid them?
Describing a person. What needs to be mentioned?
Why here is plural "We went to the movies last night."
What is the point of a new vote on May's deal when the indicative votes suggest she will not win?
What does this shorthand mean?
Opposite of a diet
Can a caster that cast Polymorph on themselves stop concentrating at any point even if their Int is low?
Anatomically Correct Mesopelagic Aves
Run Rsync for multiple files in parallel from 2 different directories and find elapsed time for each file and all files
The Next CEO of Stack OverflowGNU parallel vs & (I mean background) vs xargs -Prsync list of files in sub-directories to remote server and delete extraneousrsync multiple files to multiple directoriesrsync hangs unless I defrag ext4 filesystemWhat is wrong with my init.d script [Segmentation fault]Copy multiple files from different directories while renaming?rsync multiple files from multiple directories in linuxrsync --update with symlinksStop rsync scheduled task race condition (large directory, small time interval)Why does adding -prune to my sync script cause rsync to do a DRY-RUN?How can I iterate through each line of a file using each line to replace a string in other files, creating a new file each time
I have lots of dump files in 2 different directories that need to be uploaded using rsync, I want to run rsync for each dump file simultaneously to save time.
Dump Files:
Dir1:
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_01.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_02.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_03.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_04.dmp
Dir2:
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_01.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_02.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_03.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_04.dmp
Following rsync Command to run for each dumpfile from each directory in the background:
rclone sync /u05/expdpdump/exppdb/NoTDE_CDB_FULL_01.dmp NoTDE_Mig1:IC_dbbackup_config_datapump_xxxxxx
I managed to get the desired output to run rsync for each file, however, i want to track the start and end time for each file as well as overall elapsed time for the rsync jobs running in background.
using time
in for loop will provide only elapsed time for each file, however i also need overall elapsed time of Start and End Time after completing all jobs
dumpdir1="/u05/expdpdump/exppdb/dir1"
for i in $dumpdir1/*.dmp
do
echo " time rclone sync $i NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 &"
done
dumpdir2="/u05/expdpdump/exppdb/dir2"
for i in $dumpdir2/*.dmp
do
echo " time rclone sync $i NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 &"
done```
shell-script rsync for
add a comment |
I have lots of dump files in 2 different directories that need to be uploaded using rsync, I want to run rsync for each dump file simultaneously to save time.
Dump Files:
Dir1:
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_01.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_02.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_03.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_04.dmp
Dir2:
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_01.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_02.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_03.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_04.dmp
Following rsync Command to run for each dumpfile from each directory in the background:
rclone sync /u05/expdpdump/exppdb/NoTDE_CDB_FULL_01.dmp NoTDE_Mig1:IC_dbbackup_config_datapump_xxxxxx
I managed to get the desired output to run rsync for each file, however, i want to track the start and end time for each file as well as overall elapsed time for the rsync jobs running in background.
using time
in for loop will provide only elapsed time for each file, however i also need overall elapsed time of Start and End Time after completing all jobs
dumpdir1="/u05/expdpdump/exppdb/dir1"
for i in $dumpdir1/*.dmp
do
echo " time rclone sync $i NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 &"
done
dumpdir2="/u05/expdpdump/exppdb/dir2"
for i in $dumpdir2/*.dmp
do
echo " time rclone sync $i NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 &"
done```
shell-script rsync for
3
Possible duplicate of GNU parallel vs & (I mean background) vs xargs -P
– user1133275
yesterday
add a comment |
I have lots of dump files in 2 different directories that need to be uploaded using rsync, I want to run rsync for each dump file simultaneously to save time.
Dump Files:
Dir1:
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_01.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_02.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_03.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_04.dmp
Dir2:
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_01.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_02.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_03.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_04.dmp
Following rsync Command to run for each dumpfile from each directory in the background:
rclone sync /u05/expdpdump/exppdb/NoTDE_CDB_FULL_01.dmp NoTDE_Mig1:IC_dbbackup_config_datapump_xxxxxx
I managed to get the desired output to run rsync for each file, however, i want to track the start and end time for each file as well as overall elapsed time for the rsync jobs running in background.
using time
in for loop will provide only elapsed time for each file, however i also need overall elapsed time of Start and End Time after completing all jobs
dumpdir1="/u05/expdpdump/exppdb/dir1"
for i in $dumpdir1/*.dmp
do
echo " time rclone sync $i NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 &"
done
dumpdir2="/u05/expdpdump/exppdb/dir2"
for i in $dumpdir2/*.dmp
do
echo " time rclone sync $i NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 &"
done```
shell-script rsync for
I have lots of dump files in 2 different directories that need to be uploaded using rsync, I want to run rsync for each dump file simultaneously to save time.
Dump Files:
Dir1:
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_01.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_02.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_03.dmp
- /u05/expdpdump/exppdb/dir1/NoTDE_CDB_FULL1_04.dmp
Dir2:
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_01.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_02.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_03.dmp
- /u05/expdpdump/exppdb/dir2/NoTDE_CDB_FULL2_04.dmp
Following rsync Command to run for each dumpfile from each directory in the background:
rclone sync /u05/expdpdump/exppdb/NoTDE_CDB_FULL_01.dmp NoTDE_Mig1:IC_dbbackup_config_datapump_xxxxxx
I managed to get the desired output to run rsync for each file, however, i want to track the start and end time for each file as well as overall elapsed time for the rsync jobs running in background.
using time
in for loop will provide only elapsed time for each file, however i also need overall elapsed time of Start and End Time after completing all jobs
dumpdir1="/u05/expdpdump/exppdb/dir1"
for i in $dumpdir1/*.dmp
do
echo " time rclone sync $i NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 &"
done
dumpdir2="/u05/expdpdump/exppdb/dir2"
for i in $dumpdir2/*.dmp
do
echo " time rclone sync $i NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 &"
done```
shell-script rsync for
shell-script rsync for
edited yesterday
CoolChap007
asked 2 days ago
CoolChap007CoolChap007
63
63
3
Possible duplicate of GNU parallel vs & (I mean background) vs xargs -P
– user1133275
yesterday
add a comment |
3
Possible duplicate of GNU parallel vs & (I mean background) vs xargs -P
– user1133275
yesterday
3
3
Possible duplicate of GNU parallel vs & (I mean background) vs xargs -P
– user1133275
yesterday
Possible duplicate of GNU parallel vs & (I mean background) vs xargs -P
– user1133275
yesterday
add a comment |
1 Answer
1
active
oldest
votes
Something like this:
# `time` will give the total time
time parallel -j0 --joblog mylog rclone sync NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 ::: /u05/expdpdump/exppdb/dir1,2/*.dmp
# the log contains the time per file
cat mylog
Depending on your disks you can get better performance if you do not run all commands in parallel. You limit the number of jobs running in parallel to 5 by replacing -j0
with -j5
.
Thanks Ole, does your suggestion provides "elapsed time" for each file as well as overall elapsed time for all rclone jobs? I see 'prefixing time' in for loop will provide me elapsed time for each file, however, i am afraid, whether i can track start time and end time of overall.
– CoolChap007
yesterday
I get following error -bash: parallel: command not found
– CoolChap007
yesterday
1
@CoolChap007 so install it then!
– roaima
yesterday
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508862%2frun-rsync-for-multiple-files-in-parallel-from-2-different-directories-and-find-e%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Something like this:
# `time` will give the total time
time parallel -j0 --joblog mylog rclone sync NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 ::: /u05/expdpdump/exppdb/dir1,2/*.dmp
# the log contains the time per file
cat mylog
Depending on your disks you can get better performance if you do not run all commands in parallel. You limit the number of jobs running in parallel to 5 by replacing -j0
with -j5
.
Thanks Ole, does your suggestion provides "elapsed time" for each file as well as overall elapsed time for all rclone jobs? I see 'prefixing time' in for loop will provide me elapsed time for each file, however, i am afraid, whether i can track start time and end time of overall.
– CoolChap007
yesterday
I get following error -bash: parallel: command not found
– CoolChap007
yesterday
1
@CoolChap007 so install it then!
– roaima
yesterday
add a comment |
Something like this:
# `time` will give the total time
time parallel -j0 --joblog mylog rclone sync NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 ::: /u05/expdpdump/exppdb/dir1,2/*.dmp
# the log contains the time per file
cat mylog
Depending on your disks you can get better performance if you do not run all commands in parallel. You limit the number of jobs running in parallel to 5 by replacing -j0
with -j5
.
Thanks Ole, does your suggestion provides "elapsed time" for each file as well as overall elapsed time for all rclone jobs? I see 'prefixing time' in for loop will provide me elapsed time for each file, however, i am afraid, whether i can track start time and end time of overall.
– CoolChap007
yesterday
I get following error -bash: parallel: command not found
– CoolChap007
yesterday
1
@CoolChap007 so install it then!
– roaima
yesterday
add a comment |
Something like this:
# `time` will give the total time
time parallel -j0 --joblog mylog rclone sync NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 ::: /u05/expdpdump/exppdb/dir1,2/*.dmp
# the log contains the time per file
cat mylog
Depending on your disks you can get better performance if you do not run all commands in parallel. You limit the number of jobs running in parallel to 5 by replacing -j0
with -j5
.
Something like this:
# `time` will give the total time
time parallel -j0 --joblog mylog rclone sync NoTDE_Mig1:IC_dbbackup_config_datapump_v00rcfh_iad3p2 ::: /u05/expdpdump/exppdb/dir1,2/*.dmp
# the log contains the time per file
cat mylog
Depending on your disks you can get better performance if you do not run all commands in parallel. You limit the number of jobs running in parallel to 5 by replacing -j0
with -j5
.
answered yesterday
Ole TangeOle Tange
12.9k1457107
12.9k1457107
Thanks Ole, does your suggestion provides "elapsed time" for each file as well as overall elapsed time for all rclone jobs? I see 'prefixing time' in for loop will provide me elapsed time for each file, however, i am afraid, whether i can track start time and end time of overall.
– CoolChap007
yesterday
I get following error -bash: parallel: command not found
– CoolChap007
yesterday
1
@CoolChap007 so install it then!
– roaima
yesterday
add a comment |
Thanks Ole, does your suggestion provides "elapsed time" for each file as well as overall elapsed time for all rclone jobs? I see 'prefixing time' in for loop will provide me elapsed time for each file, however, i am afraid, whether i can track start time and end time of overall.
– CoolChap007
yesterday
I get following error -bash: parallel: command not found
– CoolChap007
yesterday
1
@CoolChap007 so install it then!
– roaima
yesterday
Thanks Ole, does your suggestion provides "elapsed time" for each file as well as overall elapsed time for all rclone jobs? I see 'prefixing time' in for loop will provide me elapsed time for each file, however, i am afraid, whether i can track start time and end time of overall.
– CoolChap007
yesterday
Thanks Ole, does your suggestion provides "elapsed time" for each file as well as overall elapsed time for all rclone jobs? I see 'prefixing time' in for loop will provide me elapsed time for each file, however, i am afraid, whether i can track start time and end time of overall.
– CoolChap007
yesterday
I get following error -bash: parallel: command not found
– CoolChap007
yesterday
I get following error -bash: parallel: command not found
– CoolChap007
yesterday
1
1
@CoolChap007 so install it then!
– roaima
yesterday
@CoolChap007 so install it then!
– roaima
yesterday
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508862%2frun-rsync-for-multiple-files-in-parallel-from-2-different-directories-and-find-e%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
Possible duplicate of GNU parallel vs & (I mean background) vs xargs -P
– user1133275
yesterday