Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
public:mysql [2022/07/19 23:28] – [database(s) backup] some color for shell script Nico | public:mysql [2022/07/19 23:44] – [database(s) backup] row lock speech Nico | ||
---|---|---|---|
Line 87: | Line 87: | ||
</ | </ | ||
- | * Here is a backup script you can use (remember to use it on the " | + | * Here is a backup script you can use (on a daily use, remember to use it on the " |
<code bash> | <code bash> | ||
Line 103: | Line 103: | ||
for i in `echo 'show databases;' | for i in `echo 'show databases;' | ||
do | do | ||
- | echo -n " ---> | + | echo -n " ---> |
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}/ | --databases --lock-tables --quick --set-charset $i > ${BACKUPDIR}/ |