Architecture of Backup and overview of Online Backup plan
← Back to MySQL University main pagePresenters: Lars Thalmann, Rafal Somla, Chuck Bell Time: Thursday, April 12th, 2007, at 6am PDT = 15 CEST Estimated length of Session: '60-90 minutes Scribe: MC Brown Attendees: To register for this Session - Please enter your name here: * Axel Schwenke * MikeZ * JanKneschke * JoergBruehe * HakanKuecuekyilmaz
[edit] Topic
Summary
- SQL Interface
- Backup Driver Interface
- Restore Driver Interface
- Optional demo using VNC (only for interested people and it might not work well if we are too many, VNC might get slow)
Participant Preparations
- Perhaps read http://forge.mysql.com/wiki/OnlineBackup
- Perhaps read http://forge.mysql.com/source/OnlineBackup/classbackup_1_1Backup__driver.html
- Perhaps read http://forge.mysql.com/source/OnlineBackup/classbackup_1_1Restore__driver.html
- Make sure you can read PDF slides: http://larsthalmann.dnsalias.com/070412.OnlineBackupTraining.pdf
- Join the #mysqluniversity IRC channel
- Listen to the presentation: https://inside.mysql.com/wiki/GeneralSessionsProcedures
- If you want to see the optional demo, install VNC client
- E.g. you can download tightvnc-1.2.9-setup.exe (for Windows) from here: https://intranet.mysql.com/secure/downloads/)
- You should connect to session "shell.mysql.com:1" with password "sakila"
- To save on bandwidth, try to set colors to few and the client to readony, e.g. execute something like "vncviewer -8bit -viewonly shell.mysql.com:1"
[edit] Session notes
[edit] Questions & Answers
- What about backing up individual tables?
- Not supported in the first version, but the current system will support it.
- What about user permissions? Can anybody do backup?
- Currently yes. This will be changed so that the security permissions do not allow anybody to backup.
- Slide 10 If the drivers belong to the storage engine, then can you move a native backup of a table from one machine to another?
- No. If you do a native backup (i.e. using a native driver specific to an individual storage engine) you cannot move it to a server that does not support the native driver. The reason is that the native drivers define the backup and storage format of the backup information.
- Slide 11 Does the backup system record the log entries that take place between the begin and end cycle of the backups?
- No. For Native drivers, the native driver must record the information about the changes that have taken place from the time when the backup started.
- Slide 14 How does the RESTORE syntax work when restoring from a single table?
- Currently RESTORE FROM backup restores everything. In the future you will be able to select specific databases and tables using RESTORE DATABASE d1 FROM backup...
- Slide 19 How about EVENTs; are these stored in the database backup with table and other definitions?
- Yes.
- Can you mix platforms between backup and restore?
- Yes. For the default drivers it should be endian-agnostic. For native drivers it will depend on the storage engine.
- Can you backup and restore to different versions?
- Old format to new will work. New to old is more difficult to achieve. Some tools will be developed that will enable extraction of data in the backup files.
- What happens if a backup is started in the middle of an ongoing transaction?
- If the transaction has not been comitted, then it will not appear in the backup. This is related to the idea of the validation point. If the data has not been committed when the validation point is reached then it is either not backed up, or the restore portion of the native driver knows not to commit this information during recovery.
- Slide 25 Can one storage engine potentially block all others while waiting for a lock?
- Yes, it's possible. But that's why you should follow the procedure on this page.
- What about multiple engine backups. How is the information stored?
- Each backup page in the backup stream is marked according to which storage engine/backup driver it belongs.
- Can you send information during all of these phases?
- Yes, the native driver can be sending information during any of the phases?
- How do you point in time recovery?
- Same as currently. A combination of the backup file and re-executing sections of the binary log?
- Does the backup kernel support writing multiple backup streams in parallel?
- Not currently. But it should be easy to multiplex the streams on to multiple devices but splitting the writes by the backup pages.
