Compare commits
No commits in common. "7b4ca18ba8c6460faf6631416536b3b84f45c914" and "9dd0cb98f80279b1216afb362bf0c00ca4bd11cc" have entirely different histories.
7b4ca18ba8
...
9dd0cb98f8
2 changed files with 3 additions and 3 deletions
|
@ -11,7 +11,7 @@ rm -f ${LOGFILE};
|
||||||
|
|
||||||
for i in `echo 'show databases;' | mysql | grep -v Database`;
|
for i in `echo 'show databases;' | mysql | grep -v Database`;
|
||||||
do
|
do
|
||||||
echo -n " ---> backing up ${i}..." >> ${LOGFILE}
|
echo -n " ---> backuping ${i}..." >> ${LOGFILE}
|
||||||
mysqldump --add-drop-table --add-locks --create-options --disable-keys --extended-insert --single-transaction\
|
mysqldump --add-drop-table --add-locks --create-options --disable-keys --extended-insert --single-transaction\
|
||||||
--databases --lock-tables --quick --set-charset $i > ${BACKUPDIR}/$i.sql 2>> ${LOGFILE};
|
--databases --lock-tables --quick --set-charset $i > ${BACKUPDIR}/$i.sql 2>> ${LOGFILE};
|
||||||
if [ $? -eq 0 ];
|
if [ $? -eq 0 ];
|
||||||
|
|
|
@ -12,8 +12,8 @@ cd ${BACKUPDIR}
|
||||||
echo "start" >> ${LOGFILE}
|
echo "start" >> ${LOGFILE}
|
||||||
for i in `psql --list --tuples-only --port 6432 | grep -v template0 | grep -v template1 | cut -f 2 -d " " | sed '/^$/d' | tr "\n" " "`;
|
for i in `psql --list --tuples-only --port 6432 | grep -v template0 | grep -v template1 | cut -f 2 -d " " | sed '/^$/d' | tr "\n" " "`;
|
||||||
do
|
do
|
||||||
echo -n " ---> backing up ${i}..." >> ${LOGFILE}
|
echo -n " ---> backuping ${i}..." >> ${LOGFILE}
|
||||||
pg_dump --port 5432 ${i} > ${i}.sql && rm -f ${i}.sql.bz2 && bzip2 ${i}.sql >> ${LOGFILE};
|
pg_dump --port 6432 ${i} > ${i}.sql && rm -f ${i}.sql.bz2 && bzip2 ${i}.sql >> ${LOGFILE};
|
||||||
if [ $? -eq 0 ];
|
if [ $? -eq 0 ];
|
||||||
then
|
then
|
||||||
echo " OK" >> ${LOGFILE};
|
echo " OK" >> ${LOGFILE};
|
||||||
|
|
Loading…
Reference in a new issue