Link to home
Start Free TrialLog in
Avatar of Vai777
Vai777

asked on

Locating a cron job in Centos and editing an existing mount.

Hi,

I am trying to find out where a daily mysqldump file gets executed on a Centos box as it needs editing.

The original person who set this job up has left the company along with any information about this Centos box.

I have attached a screenshot of the cronlog job running but I just cannot find out where it is running.
I've looked in the /etc/cron.d, cron.daily files but can't see any evidence of it.

I will also probably need to change the mnt to the server called blackpool as we have moved to a new domain with different username and password credentials so any help with changing this as well would be great.

Thanks!
centos-log.jpg
Avatar of Adrian Cantrill
Adrian Cantrill
Flag of Australia image

It looks like it runs as root, my first port of call would be doing a crontab -l as root ? i'm assuming you have tried this ?
Look into:
/var/spool/cron/
if there are any other users who run cron jobs using crontab.
Other sources are
/etc/cron.d/
/etc/cron.daily/
and os on or
/var/spool/cron/atjobs/
/var/spool/cron/atspool/

Or do a time consuming:
find / -type f -exec grep "mysqldump" /dev/null {} \;
or more specific
find / -type f -exec grep "mysqldump" /dev/null {} \; | grep blackpool

Regards,

Oli
Maybe these are weekly jobs because they are specific for week day. Have a look in

/etc/cron.weekly/

Regards,

Oli
Avatar of Vai777
Vai777

ASKER

Ah ha!
No I hadn't done this. I'm not very familiar with the command line on Linux. I've just been trying to browse around the filesystem looking for the cron job.

After doing the crontab -l command I can see the entries for the job. How can I edit this? And can you explain the command that is executed a bit? The first part mainly. I get the idea on the latter part. Is the job called mysqldump?
Also I think the mount to blackpool will need setting up again.
ASKER CERTIFIED SOLUTION
Avatar of Adrian Cantrill
Adrian Cantrill
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Vai777

ASKER

What is the lollipop password for? Is it the mount? How do I save any changes and exit the editor?

Sorry to sound like a newbie but I'm a Linux novice tbh.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Vai777

ASKER

Thanks woolnoir.
How can I tell if the /mnt/blackpool.... is working correctly? What credentials is it using to mount this location?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Vai777

ASKER

I've just looked in the /etc/fstab file and can see the mount and the user credentials so I can edit this and set this up with the new credentials.

I'm using vi to edit the file.

Your help with this has been great. Thanks woolnoir. I've learnt something today. :-)
Thats what Experts-Exchange is all about :) Were all here to learn.
Avatar of Vai777

ASKER

A great help. I managed to get my head around how it was all setup.
I can now document this for future reference either by myself or colleagues.