Donate Share

AutoMySQLBackup

Tracker: Feature Requests

5 Create matching status text file - ID: 2858543
Last Update: Attachment added ( nobody )

Add a routine (with appropriate config variables/flags) that uses mysqlshow
to create a matching text status file just prior to the dump

# Database info/status function
dbstatus () {
mysqlshow --user=$USERNAME --password=$PASSWORD --host=$DBHOST $1 --status
> $2
return 0
}

Then call it whenever the dump is done. Maybe it should just be part of
the dump routine.

dbstatus "$DB"
"$BACKUPDIR/weekly/$DB/${DB}_week.$W.$DATE.status.txt"
dbdump "$DB" "$BACKUPDIR/weekly/$DB/${DB}_week.$W.$DATE.sql"

Resulting text file can be useful when looking at doing restores

Database: StatExample
+----------------------+--------+---------+------------+-----------+-------
---------+-------------+-----------------+--------------+-----------+------
----------+---------------------+-------------+------------+---------------
----+----------+------------------+----------------------------------------
-------+
| Name | Engine | Version | Row_format | Rows |
Avg_row_length | Data_length | Max_data_length | Index_length | Data_free |
Auto_increment | Create_time | Update_time | Check_time | Collation
| Checksum | Create_options | Comment
|
+----------------------+--------+---------+------------+-----------+-------
---------+-------------+-----------------+--------------+-----------+------
----------+---------------------+-------------+------------+---------------
----+----------+------------------+----------------------------------------
-------+
| Assessment | InnoDB | 10 | Compact | 108515 | 72
| 7880704 | 0 | 0 | 0 | 108228
| 2009-08-31 15:25:16 | | |
latin1_general_cs | | row_format=FIXED | InnoDB free: 4096 kB
|
| Dataset | InnoDB | 10 | Compact | 1 | 16384
| 16384 | 0 | 0 | 0 | 2
| 2009-08-31 15:06:18 | | |
latin1_general_cs | | row_format=FIXED | InnoDB free: 0 kB
|
| Encounter | InnoDB | 10 | Compact | 558987 | 77
| 43581440 | 0 | 21577728 | 0 | 569391
| 2009-08-31 19:19:32 | | |
latin1_general_cs | | row_format=FIXED | InnoDB free: 4384768 kB;
InnoDB free: 6144 kB |
| TimeCorrection | InnoDB | 10 | Compact | 121117 | 30
| 3686400 | 0 | 0 | 0 |
| 2009-08-31 15:08:03 | | |
latin1_general_cs | | | InnoDB free: 4096 kB
|
+----------------------+--------+---------+------------+-----------+-------
---------+-------------+-----------------+--------------+-----------+------
----------+---------------------+-------------+------------+---------------
----+----------+------------------+----------------------------------------
-------+


Nobody/Anonymous ( nobody ) - 2009-09-14 12:09

5

Open

None

Nobody/Anonymous

Interface Improvements (example)

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File ( 1 )

Filename Description Download
StatExample_2009-09-13_20h05m.Sunday.status.txt Text file report example Download

Change ( 1 )

Field Old Value Date By
File Added 342884: StatExample_2009-09-13_20h05m.Sunday.status.txt 2009-09-14 12:09 nobody