{"id":5,"date":"2016-03-11T18:13:51","date_gmt":"2016-03-11T18:13:51","guid":{"rendered":"http:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/?p=5"},"modified":"2020-03-05T09:11:51","modified_gmt":"2020-03-05T12:11:51","slug":"ploop-snapshots-and-backups","status":"publish","type":"post","link":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/2016\/03\/11\/ploop-snapshots-and-backups\/","title":{"rendered":"Criando snapshotting de container OpenVZ"},"content":{"rendered":"<p><strong>Fontes:<\/strong><\/p>\n<ul>\n<li><a href=\"http:\/\/openvz.livejournal.com\/44508.html\" target=\"_blank\">http:\/\/openvz.livejournal.com\/44508.html<\/a><\/li>\n<li><a href=\"https:\/\/openvz.org\/Man\/vzctl.8#Snapshotting\" target=\"_blank\">https:\/\/openvz.org\/Man\/vzctl.8#Snapshotting<\/a><\/li>\n<\/ul>\n<p style=\"text-align: justify;\">Segue abaixo trecho retirado do manual do OpenVZ relacionado ao assunto.<\/p>\n<h3 style=\"text-align: justify;\"><span id=\"Snapshotting\" class=\"mw-headline\">Snapshotting<\/span><\/h3>\n<p style=\"text-align: justify;\">Snapshotting is a feature based on checkpointing and ploop shapshots. It allows to save a complete state of container file system. Plus, if the container is running, it\u2019s in-memory state (as in checkpointing). Note that snapshot functionality is only working for containers on ploop device.<\/p>\n<p style=\"text-align: justify;\"><!--more--><\/p>\n<p style=\"text-align: justify;\"><code><b>snapshot<\/b> <i>CTID<\/i> [<b>--id<\/b> <i>uuid<\/i>] [<b>--name<\/b> <i>name<\/i>] [<b>--description<\/b> <i>desc<\/i>]<br \/>\n[<b>--skip-suspend<\/b>] [<b>--skip-config<\/b>]<\/code><\/p>\n<p style=\"text-align: justify;\">Creates a container snapshot, i.e. saves the current container state, including its file system state, running processes state, and configuration file.<\/p>\n<p style=\"text-align: justify;\">If a container is running, and <code><b>--skip-suspend<\/b><\/code> option is not specified, a container is checkpointed and then restored, and CT memory dump becomes the part of snapshot.<\/p>\n<p style=\"text-align: justify;\">Unless <code><b>--skip-config<\/b><\/code> option is given, container configuration file is saved to the snapshot.<\/p>\n<p style=\"text-align: justify;\">If <i>uuid<\/i> is not specified, it is auto-generated. Options <code><b>--name<\/b><\/code> and <code><b>--description<\/b><\/code> can be used to specify the snapshot name and description, respectively. Name is displayed by <code><b>snapshot-list<\/b><\/code>.<\/p>\n<p style=\"text-align: justify;\"><code><b>snapshot-switch<\/b> <i>CTID<\/i> [<b>--skip-resume<\/b> | <b>--must-resume<\/b>] [<b>--skip-config<\/b>] <b>--id<\/b> <i>uuid<\/i><\/code><\/p>\n<p style=\"text-align: justify;\">Switches the container to a snapshot identified by <i>uuid<\/i>, restoring its file system state, configuration (if available) and its running state (if available).<\/p>\n<p style=\"text-align: justify;\"><b>Note that the current state of a container (including its file system state and its configuration file) is lost!<\/b><\/p>\n<p style=\"text-align: justify;\">Option <code><b>--skip-resume<\/b><\/code> is used to ignore a CT memory dump file in a snapshot, as a result the container will end up being in a stopped state (same as if a snapshot has been taken with <code><b>--skip-suspend<\/b><\/code>).<\/p>\n<p style=\"text-align: justify;\">If option <code><b>--must-resume<\/b><\/code> is set, absense of a memory dump is treated as an error, and the inability to restore from the memory dump is treated as an error rather than warning.<\/p>\n<p style=\"text-align: justify;\">Option option <code><b>--skip-config<\/b><\/code> is used to ignore the CT configuration file in a snapshot, i.e. the current configuration file will be left as is.<\/p>\n<p style=\"text-align: justify;\"><code><b>snapshot-delete<\/b> <i>CTID<\/i> <b>--id<\/b> <i>uuid<\/i><\/code><\/p>\n<p style=\"text-align: justify;\">Removes a specified snapshot.<\/p>\n<p style=\"text-align: justify;\"><code><b>snapshot-mount<\/b> <i>CTID<\/i> <b>--id<\/b> <i>uuid<\/i> <b>--target<\/b> <i>directory<\/i><\/code><\/p>\n<p style=\"text-align: justify;\">Mounts a snapshot specified by <i>uuid<\/i> to a <i>directory<\/i>. Note this mount is read-only.<\/p>\n<p style=\"text-align: justify;\"><code><b>snapshot-umount<\/b> <i>CTID<\/i> <b>--id<\/b> <i>uuid<\/i><\/code><\/p>\n<p style=\"text-align: justify;\">Unmounts a specified snapshot.<br \/>\n<code><b>snapshot-list<\/b> <i>CTID<\/i> [<b>-H<\/b>] [<b>-o<\/b> <i>field<\/i>[,<i>field<\/i>...] [<b>--id<\/b> <i>uuid<\/i>]<\/code><\/p>\n<p style=\"text-align: justify;\">List container\u2019s snapshots.<\/p>\n<p style=\"text-align: justify;\">You can suppress displaying header using <b>-H<\/b> option.<\/p>\n<p style=\"text-align: justify;\">You can use the <b>-o<\/b> option to display only the specified <i>field<\/i>(s). List of available fields can be obtained using <b>-L<\/b> option.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Fontes: http:\/\/openvz.livejournal.com\/44508.html https:\/\/openvz.org\/Man\/vzctl.8#Snapshotting Segue abaixo trecho retirado do manual do OpenVZ relacionado ao assunto. Snapshotting Snapshotting is a feature based on checkpointing and ploop shapshots. It allows to save a complete state of container file system. Plus, if the container is running, it\u2019s in-memory state (as in checkpointing). Note that snapshot functionality is only working [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/posts\/5"}],"collection":[{"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/comments?post=5"}],"version-history":[{"count":18,"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/posts\/5\/revisions"}],"predecessor-version":[{"id":284,"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/posts\/5\/revisions\/284"}],"wp:attachment":[{"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/media?parent=5"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/categories?post=5"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pessoal.ect.ufrn.br\/~rafaelprazeres\/index.php\/wp-json\/wp\/v2\/tags?post=5"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}