How to set a cronjob in Linux:-
#findsmb
#ls –lh /backup ---- Show the backup folder permission in details
#crontab –l ------ Show the cron job list
#crontab –e ------- add any cron job through this command
#df –h ----- Show the partition details in linux
#smbclient //Network IP/data –U ******%******* ----- -- Access the windows shared system from Linux machine
#ls /mnt -------Show the list of mount directory in your system
#mkdir /mnt/databkp/ ------- Create a folder in mnt directory which you have to want mount in
#ls /mnt/databkp/
#mount –t cifs -0 username=********,password=******** //Network IP/data /mnt/databkp
------------------------Mount the new backup folder with windows share system
To set a cron job
Copy this command & paste it in #crontab –e
Command is:-
cp /backup/backup_file_name ‘date +%d-%m-%y’.sql /mnt/databkp
No comments:
Post a Comment