I run a nightly backup script with su from SManager's scheduler at 2AM. At first it just executed the onandroid script. It worked great but onandroid only goes so far. So I recently added a command to tar my /sdcard and put it on the external SD card after onandroid completes:
tar —exclude DailyBackup.sh -X /mnt/extSdCard/SdCardBackupExclude.txt -chzvf /
mnt/extSdCard/sdcardBackup.tar.gz /sdcard | tee /mnt/extSdCard/sdcardBackupLog.
txt
When I run the script manually from SManager's config page for the script, it runs and completes just fine.
But when I let it run from the scheduler, I end up with an error in SManager's log about a broken pipe. The resulting tar file is of 0 bytes. And the log shows that tar has processed only a couple, empty files and folders.
I thought it might be something to do with wakelock. So last night I enabled wakelock for both the script and for SManager overall. No difference. So I guess that's not it.
I don't understand what is happening here. Can anyone shed any light? Thanks