Guest User

Untitled

a guest
Mar 18th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. jak@swManzana:~$ ls -l /backup/tempweb.sql
  2. -rw-rw-r-- 1 jak jak 204874 Mar 17 23:45 /backup/tempweb.sql
  3. jak@swManzana:~$ date
  4. Thu Mar 17 23:51:01 MDT 2016
  5. jak@swManzana:~$ date
  6. Thu Mar 17 23:53:03 MDT 2016
  7. jak@swManzana:~$ ls -l /backup/tempweb.sql
  8. -rw-rw-r-- 1 jak jak 204874 Mar 17 23:45 /backup/tempweb.sql
  9. jak@swManzana:~$ ls -l /backup/tempweb.sql
  10. -rw-rw-r-- 1 jak jak 204874 Mar 17 23:45 /backup/tempweb.sql
  11. jak@swManzana:~$ date
  12. Thu Mar 17 23:54:03 MDT 2016
  13. jak@swManzana:~$ cat /usr/scripts/respsql2.sh
  14. #MYDATE=$(date +"%Y-%m-%d");
  15. #echo %MYDATE%;
  16. MYDATE=`date +"%Y_%m_%d_%H_%M_%S"`
  17. echo $MYDATE
  18. MYDATE2=$(date +%F_%T)_dbtarimas.sql;
  19. echo $MYDATE2
  20. #mysqldump --opt dbtarimas tmtarima ttarcprod ttarclote > /backup/$MYDATE2
  21. mysqldump --opt tempweb tcathue tdetailtemp tgrupodtemp tgrupomtemp tmastertemp ttermom > /backup/tempweb.sql
  22. cp /backup/tempweb.sql /home/jak/sql/_tempweb.sql
  23. scp /backup/tempweb.sql jak@frigorificos.noip.me:/home/jak/sql/
  24. echo "==========================FINALIZADO==================="
  25. #scp /backup/tari.sql jak@198.50.136.184:/home/jak/sql/
  26. jak@swManzana:~$ ls -l /usr/scripts/respsql2.sh
  27. -rwxr-xr-x 1 root root 566 Mar 17 23:41 /usr/scripts/respsql2.sh
  28. jak@swManzana:~$ crontab -l
  29. # Edit this file to introduce tasks to be run by cron.
  30. #
  31. # Each task to run has to be defined through a single line
  32. # indicating with different fields when the task will be run
  33. # and what command to run for the task
  34. #
  35. # To define the time you can provide concrete values for
  36. # minute (m), hour (h), day of month (dom), month (mon),
  37. # and day of week (dow) or use '*' in these fields (for 'any').#
  38. # Notice that tasks will be started based on the cron's system
  39. # daemon's notion of time and timezones.
  40. #
  41. # Output of the crontab jobs (including errors) is sent through
  42. # email to the user the crontab file belongs to (unless redirected).
  43. #
  44. # For example, you can run a backup of all your user accounts
  45. # at 5 a.m every week with:
  46. # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
  47. #
  48. # For more information see the manual pages of crontab(5) and cron(8)
  49. #
  50. # m h dom mon dow command
  51. 0,8,16,24,32,40,48,56 8-20 * * 1-6 /usr/scripts/respsql.sh
  52. #*/8 20-8 * * * /usr/scripts/respsql2.sh > /tmp/log.txt 2>&1
  53. 40 8-20 * * 1-6 /usr/scripts/respsqlMedDia.sh
  54. */8 0-8,20-23 * * 1-7 /usr/scripts/respsql2.sh > > /tmp/log.txt 2>&1
  55. jak@swManzana:~$
  56. jak@swManzana:~$ ls -l /backup/tempweb.sql
  57. -rw-rw-r-- 1 jak jak 204874 Mar 17 23:45 /backup/tempweb.sql
  58. jak@swManzana:~$ date
  59. Thu Mar 17 23:56:33 MDT 2016
  60. jak@swManzana:~$
Add Comment
Please, Sign In to add comment