{"id":8583,"date":"2016-08-28T22:03:27","date_gmt":"2016-08-28T21:03:27","guid":{"rendered":"https:\/\/wp.okra.host\/article\/mysql-snapshots-and-rollbacks\/"},"modified":"2021-03-07T14:32:32","modified_gmt":"2021-03-07T13:32:32","slug":"mysql-snapshots-and-rollbacks","status":"publish","type":"ht_kb","link":"https:\/\/kb.okra.host\/de\/article\/mysql-snapshots-and-rollbacks\/","title":{"rendered":"MySQL-Snapshots und Rollbacks"},"content":{"rendered":"<p>apnscp supports simple MySQL database snapshots as of August 28, 2016. Snapshots are ideal for preserving your database structure before a software update or any situation in which there is risk of loss of data not covered by the nightly backups. Snapshots perform a full\u00a0database export\u00a0and stores this file, uncompressed, in your backup directory. Snapshots are automatically removed after 5 days. Snapshots that have been taken may be used, along with automated backups, for rollbacks within the control panel.<\/p>\n<div id=\"attachment_1351\" style=\"width: 651px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2016\/08\/db-restore-final.png\" rel=\"lightbox-0\" data-lbwps-width=\"641\" data-lbwps-height=\"409\" data-lbwps-srcsmall=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2016\/08\/db-restore-final.png\"><img decoding=\"async\" aria-describedby=\"caption-attachment-1351\" loading=\"lazy\" class=\"size-full wp-image-1351\" src=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2016\/08\/db-restore-final.png\" alt=\"Database restore interface. Camera icon indicates a snapshot.\" width=\"641\" height=\"409\" \/><\/a><\/p>\n<p id=\"caption-attachment-1351\" class=\"wp-caption-text\">Database restore interface. Camera icon indicates a snapshot.<\/p>\n<\/div>\n<h2 id=\"using-snapshots\" >Using snapshots<\/h2>\n<p>Snapshots\u00a0are created within the <a href=\"https:\/\/kb.okra.host\/de\/control-panel\/logging-into-the-control-panel\/\">Bedienfeld<\/a>:<\/p>\n<ol>\n<li>Visit <strong>Databases<\/strong> &gt; <strong>MySQL Manager<\/strong> &gt; <em>List Users and\u00a0Databases<\/em><\/li>\n<li>Select the database to snapshot.<\/li>\n<li>Select\u00a0<strong>Snapshot<\/strong> from the actions available in the dropdown.<\/li>\n<li>A snapshot will process, which may take a few minutes depending upon size. Once completed a modal dialog will pop-in confirming success.<\/li>\n<\/ol>\n<p>Snapshots may be accessed within the control panel for 5 days after which time they are automatically deleted. A better long-term solution is to use <strong>Databases<\/strong> &gt; <strong>MySQL Backups<\/strong> within the control panel to configure automatic backups with rollout.<\/p>\n<p>Snapshots are never compressed, located within your <a href=\"https:\/\/kb.okra.host\/de\/platform\/home-directory-location\/\">home directory<\/a>, under <code>mysql_backups\/<\/code>, and follow the format\u00a0<em>DBNAME<\/em>&#8211;<em>YYYYMMDDHHMMSS<\/em>-snapshot.sql<\/p>\n<h2 id=\"restoring-from-a-snapshot-or-backup\" >Restoring from a snapshot or backup<\/h2>\n<p>Restoration from a snapshot (short-term) or backup (long-term) can be done easily within the control panel:<\/p>\n<ol>\n<li>Visit <strong>Databases<\/strong> &gt; <strong>MySQL Manager<\/strong> &gt; <em>List Users and\u00a0Databases<\/em><\/li>\n<li>Select the database to\u00a0restore.<\/li>\n<li>Select\u00a0<strong>Restore from Backup<\/strong>\u00a0from the actions available in the dropdown.<\/li>\n<li>Choose which\u00a0backup to restore from.\n<ul>\n<li>Backups are sorted by most recent first. Snapshots are denoted by a camera icon.<\/li>\n<\/ul>\n<\/li>\n<li>Check the box to confirm deletion of your current database.\n<ul>\n<li>All data in the database will be emptied. All backup tasks and user privileges will be preserved.<\/li>\n<\/ul>\n<\/li>\n<li>Select <strong>Import<\/strong><\/li>\n<\/ol>\n<h3 id=\"using-non-cp-exports-as-restore-points\" >Using\u00a0non-CP exports\u00a0as restore points<\/h3>\n<p>To use a user-created backup to restore from, such as an\u00a0older snapshot no longer present in <code>mysql_backups\/<\/code>\u00a0or even a phpMyAdmin export, upload the file to <code>mysql_backups\/<\/code> within your <a href=\"https:\/\/kb.okra.host\/de\/platform\/home-directory-location\/\">home directory<\/a>\u00a0via <a href=\"https:\/\/kb.okra.host\/de\/ftp\/accessing-ftp-server\/\">FTP<\/a> or the control panel (<strong>Dateien<\/strong> &gt; <strong>Datei-Manager<\/strong>).\u00a0The backup must follow a few\u00a0rules:<\/p>\n<ul>\n<li>File name must be named\u00a0<em>DBNAME<\/em>-20 followed by exactly\u00a06 digits (YYMMDD)\n<ul>\n<li>Or optionally followed by 1 or more digits and\u00a0&#8220;-snapshot&#8221;<\/li>\n<\/ul>\n<\/li>\n<li>End in one of the supported formats: .sql, .zip, .tar, .gz<\/li>\n<\/ul>\n<p>Once detected successfully, the backup will appear as an option to restore from.<\/p>\n<h2 id=\"see-also\" >Siehe auch<\/h2>\n<ul>\n<li>KB: <a href=\"https:\/\/kb.okra.host\/de\/mysql\/creating-a-database\/\">Eine Datenbank erstellen<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>apnscp supports simple MySQL database snapshots as of August 28, 2016. Snapshots are ideal for preserving your database structure before a software update or any situation in which there is risk of loss of data not covered by the nightly backups. Snapshots perform a full\u00a0database export\u00a0and stores this file, uncompressed,&#8230;<\/p>","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[61],"ht-kb-tag":[],"class_list":["post-8583","ht_kb","type-ht_kb","status-publish","format-standard","has-post-thumbnail","hentry","ht_kb_category-mysql"],"_links":{"self":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/comments?post=8583"}],"version-history":[{"count":1,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8583\/revisions"}],"predecessor-version":[{"id":8584,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8583\/revisions\/8584"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media\/8585"}],"wp:attachment":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media?parent=8583"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-category?post=8583"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-tag?post=8583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}