Compare commits

...

2 commits

Author SHA1 Message Date
n
7b4ca18ba8 use default port 2019-12-03 22:58:47 +01:00
n
f9bedc102f yes I speak very good english indeed 2019-12-03 22:58:19 +01:00
2 changed files with 3 additions and 3 deletions

View file

@ -11,7 +11,7 @@ rm -f ${LOGFILE};
for i in `echo 'show databases;' | mysql | grep -v Database`;
do
echo -n " ---> backuping ${i}..." >> ${LOGFILE}
echo -n " ---> backing up ${i}..." >> ${LOGFILE}
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};
if [ $? -eq 0 ];

View file

@ -12,8 +12,8 @@ cd ${BACKUPDIR}
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" " "`;
do
echo -n " ---> backuping ${i}..." >> ${LOGFILE}
pg_dump --port 6432 ${i} > ${i}.sql && rm -f ${i}.sql.bz2 && bzip2 ${i}.sql >> ${LOGFILE};
echo -n " ---> backing up ${i}..." >> ${LOGFILE}
pg_dump --port 5432 ${i} > ${i}.sql && rm -f ${i}.sql.bz2 && bzip2 ${i}.sql >> ${LOGFILE};
if [ $? -eq 0 ];
then
echo " OK" >> ${LOGFILE};