I discovered that executing prefilebackup script that initiates background process (unattached to prefilebackup script with nohup), waits that unatached process to end before continuing with backup.
Here is simplified pefilabackup script, written here just for demonstration purpose.
This prefilebackup script is blocking backup for 120s, before it continues to run:
#!/bin/bash # Write start time of initiation of prefilebackup script to file /tmp/prefile.log echo Started $(date) > /tmp/prefile.log # Initiate background process unattached to prefilebackup script nohup sleep 120 & # Write time when this script ends echo Ended $(date) >> /tmp/prefile.log
Log file that is result of script above shows that whole prefilebackup scripts does not wait 120s:
[root@OEL7_a tmp]# cat /tmp/prefile.log Started Wed Jan 9 18:52:36 EST 2019 Ended Wed Jan 9 18:52:36 EST 2019
But still, backup starts only after background script ends after 120s. Here is urbackup log file for such backup session:
|Info||9/1/2019 18:52||Starting unscheduled incremental file backup…|
|Info||9/1/2019 18:54||Backing up “root” without snapshot.|
|Info||9/1/2019 18:54||Indexing of “root” done. 10027 filesystem lookups 0 db lookups and 0 db updates|
|Info||9/1/2019 18:54||OEL7_a: Loading file list…|
|Info||9/1/2019 18:54||OEL7_a: Calculating file tree differences…|
|Info||9/1/2019 18:54||OEL7_a: Calculating tree difference size…|
|Info||9/1/2019 18:54||OEL7_a: Linking unchanged and loading new files…|
|Info||9/1/2019 18:54||Referencing snapshot on “OEL7_a” for path “root” failed: FAILED|
|Warnings||9/1/2019 18:54||Error getting complete file "8JEilXeXc0NjtStE5CRI|
|Info||9/1/2019 18:54||Waiting for file transfers…|
|Info||9/1/2019 18:54||Waiting for file hashing and copying threads…|
|Warnings||9/1/2019 18:55||Not all folder metadata could be applied. Metadata was inconsistent.|
|Info||9/1/2019 18:55||Writing new file list…|
|Info||9/1/2019 18:55||All metadata was present|
|Info||9/1/2019 18:55||Transferred 15.4031 MB - Average speed: 22.6765 MBit/s|
|Info||9/1/2019 18:55||Time taken for backing up client OEL7_a: 3m 20s|
|Info||9/1/2019 18:55||Backup succeeded|
Please note that I have tried different timeouts (lower or higher of 120s), and concluded that this prefilebackup script somehow waits ending of background process, that should not be waited at all.
I am testing urbackup server ( UrBackup 2.2.11) with linux clients with version v220.127.116.11.
Client is running on Oracle Enterprise Linux 7 (OEL 7).