Hello folks,
It's time to write my first cron job and i was kind of hoping that some kind person will help me get started.
What i would like to do is tar.gz my mysql database directory /usr/local/mysql/var and place the var.tar.gz into the /temp directory every couple of minutes or so to see if/how it works and then remove the cron.
I know how to create the tarball of var from mysql in mysql directory
tar -cvf /tmp/var.tar ./var/*
and how to gzip it in the /tmp ...
gzip -v var.tar
resulting in var.tar.gz in the /tmp directory.
How do i now write the cron job is it possible to name the tar.gz file in a way that reflects the time the operation was carried out.
Thanks for any help thats kindly put forward
Kind Regards
Paul
giving