Showing posts with label :: Unix. Show all posts
Showing posts with label :: Unix. Show all posts

Monday, April 29, 2013

Backup database with Crontab

How to backup database with schedule. here the codes. First let's create a chunk of codes to backup
nano /home/arul/backup_database.sh
and type these code:
mysqldump -u dbuser -pdbpass dbname > /home/arul/backup/file_name_backup_`date +\%Y%m%d`.sql
then let's set the schedule to execute the code with Crontab
firstly, edit your crontab.
crontab -e
type the code:
0 0 * * * /home/arul/backup_database.sh
You can list crontab execution code with:
crontab -l

Tuesday, April 9, 2013

How to display name of application command path on unix base

Just open your terminal, type the command.
for example we are search where the php function locate
>type php
will return display
php is /usr/bin/php