When I run my rsync script manually it copies each file in sequence and counts down the numbers of files in each sequence as well:ArchiveLogs/BANK_DWH/db2inst1/BANK_DWH/NODE0000/LOGSTREAM0000/C0000001/S0001065.LOG           4202496 100%    2.71MB/s    0:00:01 (xfer#28, to-check=1290/3630)      ArchiveLogs/BANK_DWH/db2inst1/BANK_DWH/NODE0000/LOGSTREAM0000/C0000001/S0001066.LOG           4202496 100%    3.00MB/s    0:00:01 (xfer#29, to-check=1289/3630)      ArchiveLogs/BANK_DWH/db2inst1/BANK_DWH/NODE0000/LOGSTREAM0000/C0000001/S0001067.LOG           3510272 100%    3.05MB/s    0:00:01 (xfer#30, to-check=1288/3630)However, when I run it via a cron job, everything is done randomly,and also it seems as if many instances are opened at once:ArchiveLogs/BANK_DWH/db2inst1/BANK_DWH/NODE0000/LOGSTREAM0000/C0000000/S0001052.LOG             0   0%    0.00kB/s    0:00:00         12288 100%  129.03kB/s    0:00:00 (xfer#306, to-check=1401/3630)  ArchiveLogs/BANK_DWH/db2inst1/BANK_DWH/NODE0000/LOGSTREAM0000/C0000000/S0001053.LOG             0   0%    0.00kB/s    0:00:00        327680   7%  138.29kB/s    0:00:28        327680  54%  136.52kB/s    0:00:01       2555904  75%  376.07kB/s    0:00:02        425984  77%  185.47kB/s    0:00:00        688128 100%  355.93kB/s    0:00:01 (xfer#310, to-check=1460/3630)  ArchiveLogs/BANK_DWH/db2inst1/BANK_DWH/NODE0000/LOGSTREAM0000/C0000000/S0000994.LOG        700416 100%  212.55kB/s    0:00:03 (xfer#330, to-check=1431/3630)  ArchiveLogs/BANK_DWH/db2inst1/BANK_DWH/NODE0000/LOGSTREAM0000/C0000000/S0001023.LOG             0   0%    0.00kB/s    0:00:00         12288 100%   15.81kB/s    0:00:00 (xfer#331, to-check=1430/3630)  ArchiveLogs/BANK_DWH/db2inst1/BANK_DWH/NODE0000/LOGSTREAM0000/C0000000/S0001024.LOG             0   0%    0.00kB/s    0:00:00         57344 100%   62.22kB/s    0:00:00 (xfer#311, to-check=1459/3630)  ArchiveLogs/BANK_DWH/db2inst1/BANK_DWH/NODE0000/LOGSTREAM0000/C0000000/S0000995.LOG        196608  24%  137.93kB/s    0:00:04        589824  70%  172.35kB/s    0:00:01             0   0%    0.00kB/s    0:00:00         12288 100%   12.02kB/s    0:00:00 (xfer#312, to-check=1458/3630)It is obvious by the xfer# that via the cron things go weird. I run the cron and the manual script as the same user. The cron just calls the script, so there is no difference there either.This is the command I run:rsync -av --progress --partial --append-verify $remoteuser@$remoteip:$remotefolder $localfolderAlso, in my script I send an email if it fails, and when I run it manually and cancel CTRL+C then I get an email saying it was cancelled.If I kill the cron I get about 7 emails saying the job was cancelled.Any help would be greatly appreciated.Thank you.
Rsync behaving strange when running as cron
rsync