I have written a shell script that creates a backup of my MySQL database.
The following shell script will dump the mysql database and will save the .sql file on a remote location using Ftp. This script will create a backup file including the current date so you can have multiple copies of the backups of the same database under one directory.
Create a file called mysqlbkup.sh
# vi /root/mysqlbkup.sh
and paste [...]
Hi,
I'm running a shell script to do a daily backup of my mysql database. The backup is done using:
Code:
mysqldump db1 > db1.sql --user=rootuser --password=rootpassword && mysqldump db2 > db2.sql --user=rootuser --password=rootpassword
This file is saved in my root directory replacing the old/exisiting backups.
I have this MySQL backup script that I use to back up MySQL databases. Very useful, and it runs on fixed intervals using a cron. However, I need somehow provide this script with the MySQL password.
I'm writing a Bash shell script to backup our Request Tracker (RT) MySQL database on a daily basis. Instead of hard-coding the MySQL database user's password in the shell script I'd like to parse it from RT's RT_SiteConfig.pm file.
I want to run a command/shell script say script.sh from 1AM to 2AM per minute. After observing that crontab can't work it out 'per sec' I had to go with 'per min'.
Basically, My server.sh file takes backup of my database on server. This is done by three text files with names of tables in it, hence creating three backup archives.
I am trying to crate a shell script that would:
connect to a remote server that has MYSQL running
On success run "CREATE DATABASE foo;"
So far I tried:
#!/bin/bash
mysql -h 111.11.11.11 -u root -p'XXXXXXX'
mysql> CREATE DATABASE foo;
or
echo "CREATE DATABASE foo;";
But no success.
I am using the command line to run the shell script.
# sh create_mysql_database.sh
but all it does is
HI all, im new to shell scripting. need your guidence for my script. i wrote one script and is attached here
Im explaining the requirement of script.
AIM: Shell script to run automatically as per scheduled and backup few network devices configurations.
Hi Unix Gurus,
I have a requirement to write a script, Oracle DB gets referesh every 6hrs, hence we need write a script to connceting to the database , if it connects it should generate a file to proceed the next job application or when an error when connectiong to DB it should not generate any file so my next jobs will not be triggered.
Thanks in Advance !!!
Shiv