Bash script getting automatically deleted from Ubuntu 12.04 Server?

Posted by Kris Anderson on Server Fault See other posts from Server Fault or by Kris Anderson
Published on 2012-10-22T22:20:35Z Indexed on 2012/10/22 23:04 UTC
Read the original article Hit count: 238

Filed under:
|
|

I'm running a bash script on an ubuntu 12.04 through cron. The script works fine for a few weeks (runs daily backups of websites, mysql databases, and copies to Amazon S3).

However, twice now I've noticed that backups stopped happening. Both times the backup script (backupscript.sh) located in my home folder was no longer there. No one else has access to this server, so nothing was manually changed on the server and no one deleted the file by mistake.

The cron job (nano /etc/crontab) still references this script, but the script itself disappears.

What could cause this to happen? Does Ubuntu delete the script if it runs into some sort of error?

© Server Fault or respective owner

Related posts about bash

Related posts about cron