cron job for backup the database in linux/php

后端 未结 5 1799
不知归路
不知归路 2021-02-10 21:58

Am new to linux cron job, i am using mysql DB, my database name finaldb, i want to take this database every one hour,

I have folder called dailbackup, in this i have fol

5条回答
  •  感情败类
    2021-02-10 22:50

    Yes ofcourse, you can do it as long as your mysql server is up and listening :). You will need to make a shell or perl script and use edit the crond using the below command (in Fedora):

    crontab -e
    

    Components of your cron job is ::

    1) Path to your script(executable)

    2) Minutes(00-59)

    3) Hours (00 - 23)

    4) Month (01-12)

    5) Day (01-31)

    6) Day of the week (00 -06 with 00 as Sunday)

    Example :: You wat to run test_pl script every day at 1200

    entry in crontab will be ::

    00 12 * * * /home/jok/test_pl

提交回复
热议问题