Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cleaning up backup files on Ubuntu

jh_ellisFeb 18 2014 — edited Feb 21 2014

We have a RHEL Linux server running two programs whose backups get copied over to another server running Ubuntu Linux. There is a "cleanup" script running in a cron job that is supposed to delete these backups that are more than ten days old but it is not working. In fact I can't get it to work even running it manually. Script is below-

#!/bin/bash

# bash shell script to cleanup jira backup files

# The script will remove files that are 10 days or older

#

# Remove jira backup files

for FILE in `find /usr/backup/jira -mtime +10`

  do echo $FILE

  /bin/rm -f $FILE 2>/dev/null

done

When I run this script at the command prompt- ./cleanup_jira.sh nothing happens; I just move down to the command prompt. I have root owning all the folders and files involved. This was all setup years ago to run by a different user, but apparently has not been working for quite awhile so I modified it all to be run as root. I do not get a mail message to root either when I try to run it.

Any ideas please respond.

Thanks for your time,

John Ellis

This post has been answered by EdStevens on Feb 20 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2014
Added on Feb 18 2014
5 comments
966 views