db ๋ฐฑ์
์คํฌ๋ฆฝํธ ์ค๋ฅ ์ง๋ฌธ
[root@cent2 BACKUP]# ./db_backup.sh ++ /usr/bin/hostname + HOST=cent2 + LOG=/tmp/backup.log + PUSH=/root/SHELL/monitor/tel_push.sh ++ /bin/date +%Y.%m.%d + DATE=2021.03.19 + BAK_LIST=/etc/my.cnf.d + BAK_PATH=/mnt/BACKUP/cent2 + BAK_FILE=/mnt/BACKUP/cent2/2021.03.19_cent2.tgz + DB_BAK_PATH=/root/SHELL/BACKUP/xtrabackup_backupfiles + DB_BAK_FILE=/mnt/BACKUP/cent2/2021.03.19_cent2_DB.tgz + /usr/bin/mount /mnt + /usr/bin/touch /tmp/backup.log + '[' -e /mnt/BACKUP/cent2 ']' + /bin/echo '๋ฐฑ์
๋๋ ํ ๋ฆฌ๊ฐ ์์ต๋๋ค.' ๋ฐฑ์
๋๋ ํ ๋ฆฌ๊ฐ ์์ต๋๋ค. + /bin/echo + /bin/echo '=== ๋ฐฑ์
์์ ์๊ฐ : ' + /bin/date + /bin/echo + /usr/bin/mariabackup --backup --no-lock --target-dir=/root/SHELL/BACKUP/xtrabackup_backupfiles [00] 2021-03-19 22:03:31 Connecting to MySQL server host: localhost, user: not set, password: not set, port: not set, socket: not set [00] 2021-03-19 22:03:31 Failed to connect to MySQL server: Access denied for user ''@'localhost' (using password: NO). + /usr/bin/mariabackup --prepare --target-dir=/root/SHELL/BACKUP/xtrabackup_backupfiles /usr/bin/mariabackup based on MariaDB server 10.3.27-MariaDB Linux (x86_64) /usr/bin/mariabackup: Can't change dir to '/root/SHELL/BACKUP/xtrabackup_backupfiles/' (errno: 2 "No such file or directory") [00] 2021-03-19 22:03:31 can't my_setwd /root/SHELL/BACKUP/xtrabackup_backupfiles/ + /usr/bin/tar -czpPf /mnt/BACKUP/cent2/2021.03.19_cent2.tgz /etc/my.cnf.d + /usr/bin/tar -czpPf /mnt/BACKUP/cent2/2021.03.19_cent2_DB.tgz /root/SHELL/BACKUP/xtrabackup_backupfiles /usr/bin/tar: /root/SHELL/BACKUP/xtrabackup_backupfiles: Cannot stat: No such file or directory /usr/bin/tar: Exiting with failure status due to previous errors ++ /usr/bin/ls -al /mnt/BACKUP/cent2/2021.03.19_cent2.tgz ++ awk '{print $9}' + NAME=/mnt/BACKUP/cent2/2021.03.19_cent2.tgz ++ /usr/bin/ls -al /mnt/BACKUP/cent2/2021.03.19_cent2.tgz ++ awk '{print $5}' + SIZE=1554 + /bin/echo '=== ๋ฐฑ์
ํ์ผ ์ ๋ณด: ' + /bin/echo ' | ํ์ผ๋ช
: /mnt/BACKUP/cent2/2021.03.19_cent2.tgz' + /bin/echo ' | ํ์ผํฌ๊ธฐ : 1554Byte' ++ /usr/bin/ls -al /mnt/BACKUP/cent2/2021.03.19_cent2_DB.tgz ++ awk '{print $9}' + NAME=/mnt/BACKUP/cent2/2021.03.19_cent2_DB.tgz ++ /usr/bin/ls -al /mnt/BACKUP/cent2/2021.03.19_cent2_DB.tgz ++ awk '{print $5}' + SIZE=45 + /bin/echo '=== DB๋ฐฑ์
ํ์ผ ์ ๋ณด: ' + /bin/echo ' | ํ์ผ๋ช
: /mnt/BACKUP/cent2/2021.03.19_cent2_DB.tgz' + /bin/echo ' | ํ์ผํฌ๊ธฐ : 45Byte' + /bin/echo + /bin/echo '=== ๋ฐฑ์
์ข
๋ฃ ์๊ฐ : ' + /bin/date + /bin/echo + /usr/bin/umount /mnt ++ /usr/bin/cat /tmp/backup.log + /root/SHELL/monitor/tel_push.sh cent2 ' === ๋ฐฑ์
์์ ์๊ฐ : Fri Mar 19 22:03:31 UTC 2021 === ๋ฐฑ์
ํ์ผ ์ ๋ณด: | ํ์ผ๋ช
: /mnt/BACKUP/cent2/2021.03.19_cent2.tgz | ํ์ผํฌ๊ธฐ : 1554Byte === DB๋ฐฑ์
ํ์ผ ์ ๋ณด: | ํ์ผ๋ช
: /mnt/BACKUP/cent2/2021.03.19_cent2_DB.tgz | ํ์ผํฌ๊ธฐ : 45Byte === ๋ฐฑ์
์ข
๋ฃ ์๊ฐ : Fri Mar 19 22:03:31 UTC 2021' + /usr/bin/rm -f /tmp/backup.log /root/SHELL/BACKUP/xtrabackup_backupfiles