Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the acf domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php on line 6131

Deprecated: Creation of dynamic property ACF::$fields is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields.php on line 138

Deprecated: Creation of dynamic property acf_loop::$loops is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/loop.php on line 28

Deprecated: Creation of dynamic property ACF::$loop is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/loop.php on line 269

Deprecated: Creation of dynamic property ACF::$revisions is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/revisions.php on line 397

Deprecated: Creation of dynamic property acf_validation::$errors is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/validation.php on line 28

Deprecated: Creation of dynamic property ACF::$validation is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/validation.php on line 214

Deprecated: Creation of dynamic property acf_form_customizer::$preview_values is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-customizer.php on line 28

Deprecated: Creation of dynamic property acf_form_customizer::$preview_fields is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-customizer.php on line 29

Deprecated: Creation of dynamic property acf_form_customizer::$preview_errors is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-customizer.php on line 30

Deprecated: Creation of dynamic property ACF::$form_front is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-front.php on line 598

Deprecated: Creation of dynamic property acf_form_widget::$preview_values is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-widget.php on line 34

Deprecated: Creation of dynamic property acf_form_widget::$preview_reference is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-widget.php on line 35

Deprecated: Creation of dynamic property acf_form_widget::$preview_errors is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-widget.php on line 36

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the all-in-one-wp-migration domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php on line 6131

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp_plugin/wp_plugin.php on line 23

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 54

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 1539

Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 828

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the rocket domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php on line 6131

Deprecated: Creation of dynamic property acf_field_oembed::$width is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-oembed.php on line 31

Deprecated: Creation of dynamic property acf_field_oembed::$height is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-oembed.php on line 32

Deprecated: Creation of dynamic property acf_field_google_map::$default_values is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-google-map.php on line 33

Deprecated: Creation of dynamic property acf_field__group::$have_rows is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-group.php on line 31

Deprecated: Creation of dynamic property acf_field_clone::$cloning is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-clone.php on line 34

Deprecated: Creation of dynamic property acf_field_clone::$have_rows is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-clone.php on line 35

Deprecated: Creation of dynamic property jh_acf_field_table::$settings is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-table-field/class-jh-acf-field-table.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902
{"id":24430,"date":"2015-02-26T09:43:13","date_gmt":"2015-02-26T07:43:13","guid":{"rendered":"https:\/\/upcloud.com\/community\/tutorials\/managing-backups-upcloud-api"},"modified":"2015-02-26T09:43:13","modified_gmt":"2015-02-26T07:43:13","slug":"managing-backups-upcloud-api","status":"publish","type":"tutorial","link":"https:\/\/studiogo.tech\/upcloudold\/tutorial\/managing-backups-upcloud-api\/","title":{"rendered":"Managing backups using the UpCloud API"},"content":{"rendered":"\n

Backups are storage devices containing a point-in-time snapshot of your cloud server storage. Taking backups is a good way to preserve data when making system-critical changes or as assurance. A previous state of normal storage can be restored from any of its backups. Backups can also be cloned to create a new storage device. Backups are created either manually on-demand or automatically using the Simple Backups or Flexible backup schedule.<\/p>\n\n\n\n

This article explains how the backup functions can be used by employing the UpCloud API authenticated with your Base64 encoded credentials. If you are not yet entirely familiar with the usage of the API, take a look at our guide about getting started with UpCloud API<\/a>.<\/p>\n\n\n\n

\n
Test hosting on UpCloud!<\/a><\/div>\n<\/div>\n\n\n\n

Enabling Simple backup<\/h2>\n\n\n\n

Simple Backup is the easiest way of setting up an expert-level backup schedule for any Cloud Server running General Purpose, High CPU or High Memory plans. It is the best place to start configuring a reliable backup method to ensure the safety of your business-critical data.<\/p>\n\n\n\n

Simple Backup can be enabled with an easy API query to modify the server details. Set the simple_backup<\/tt> with the time in UTC 0000-2359<\/tt> for when you wish the backup to be made, followed by your selected plan dailies|weeklies|monthlies<\/tt>. Replace the server_UUID<\/tt><\/span> with the unique identity of your Cloud Server. Below is an example of enabling the Week plan for daily backups.<\/p>\n\n\n\n

PUT \/1.3\/server\/server_UUID<\/span><\/pre>\n\n\n\n
{\n    \"server\" : {\n        \"simple_backup\": \"0430,dailies\"\n    }\n}<\/pre>\n\n\n\n

Disabling the Simple Backup plan can likewise be done with a single API query by setting the simple_backup<\/tt> as no<\/tt>.<\/p>\n\n\n\n

PUT \/1.3\/server\/server_UUID<\/span><\/pre>\n\n\n\n
{\n    \"server\" : {\n        \"simple_backup\": \"no\"\n    }\n}<\/pre>\n\n\n\n

That\u2019s it, quick and easy.<\/p>\n\n\n\n

Setting up automated Flexible backups<\/h2>\n\n\n\n

Configuring an automated backup schedule works by modifying a storage device to add a backup_rules<\/tt> segment with a PUT request. These rules define how often a backup is taken, at what time of the day should the backup be stored, and how long each backup is kept before automated deletion. The following parameters are accepted in the backup rules.<\/p>\n\n\n\n

\"interval\": \"daily \/ mon \/ tue \/ wed \/ thu \/ fri \/ sat \/ sun\"\n\"time\": \"0000-2359\"\n\"retention\": \"1-1095\"<\/pre>\n\n\n\n

The example backup rule below will set up a weekly backup taken every Saturday morning at 4:30 and retained for 8 days.<\/p>\n\n\n\n

PUT \/1.3\/storage\/storage_UUID<\/span>\n{\n    \"storage\": {\n        \"backup_rule\": {\n            \"interval\": \"sat\",\n            \"time\": \"0430\",\n            \"retention\": \"8\"\n        }\n    }\n<\/pre>\n\n\n\n

The currently active backup rules will show up in the storage details.<\/p>\n\n\n\n

GET \/1.3\/storage\/storage_UUID<\/span><\/pre>\n\n\n\n

Creating on-demand backup<\/h2>\n\n\n\n

Taking an on-demand backup is fast and simple. The following POST request allows you to create a new backup disk of a specific storage device identified by the storage UUID. Include a title in the body of the request, as shown in the example below, to give a name or description of the backup device.<\/p>\n\n\n\n

POST \/1.3\/storage\/storage_UUID<\/span>\/backup\n{\n    \"storage\": {\n        \"title\": \"Manually created backup\"\n    }\n}<\/pre>\n\n\n\n

In response to a successful operation, you will get the details of the new backup storage.<\/p>\n\n\n\n

Restoring a backup<\/h2>\n\n\n\n

The main method of restoring backups is, in essence, reverting the storage disk back to the same state it was when the backup was taken.<\/p>\n\n\n\n

You can get a list of all of your backup storage with the GET request below.<\/p>\n\n\n\n

GET \/1.3\/storage\/backup<\/pre>\n\n\n\n

When restoring a backup, the server that the origin storage is attached to must first be shut down and in the stopped<\/tt> state. To find out the correct server UUID, use the following GET request with the storage UUID, as indicated by the origin in the backup, to fetch the full details of the disk you wish to restore.<\/p>\n\n\n\n

GET \/1.3\/storage\/storage_UUID<\/span><\/pre>\n\n\n\n
{\n    \"storage\": {\n        ...\n        \"servers\": {\n            \"server\": [\n                \"00e46b2e-0909-4e77-8acb-4b21e75cb5b9\"\n            ]\n        },\n        ...\n    }\n}<\/pre>\n\n\n\n

Then stop the server in preparation for the restore.<\/p>\n\n\n\n

POST \/1.3\/server\/server_UUID<\/span>\/stop<\/pre>\n\n\n\n

Once the server has been powered down, use the following POST request while replacing the backup_UUID<\/tt><\/span> with the UUID of the backup you wish to restore.<\/p>\n\n\n\n

POST \/1.3\/storage\/backup_UUID<\/span>\/restore<\/pre>\n\n\n\n

Restoring a backup will only take a moment depending on the size of the storage device. Once completed, you can restart the server again with the storage disk reverted to the backup state. Although the initial restore is fast, the new storage state must finish a background synchronisation before further actions, for example taking a new backup, can be made.<\/p>\n\n\n\n

Cloning a new disk from a backup<\/h2>\n\n\n\n

Sometimes you might not want or be able to shut down the server the origin storage is attached to, yet you would need to get access to the files stored in a backup. This can be done by cloning the backup disk to create an entirely new storage device.<\/p>\n\n\n\n

Backup disks are treated much the same as any other storage device. You can clone any backup storage using the following POST request.<\/p>\n\n\n\n

Take care when choosing the target zone for cloning a storage disk. While cloning within one zone is quick, operations between different zones can be time-consuming.<\/p>\n\n\n\n

POST \/1.3\/storage\/backup_UUID<\/span>\/clone\n{\n    \"storage\" : {\n        \"zone\" : \"fi-hel1\",\n        \"tier\" : \"maxiops\",\n        \"title\" : \"Clone of a backup disk\"\n    }\n}<\/pre>\n\n\n\n

The response will return the details of the new cloned storage device, such as its UUID. Then to access the backup files, attach the new disk to an existing server or deploy a new host using the storage disk instead of a public template.<\/p>\n\n\n\n

Summary<\/h2>\n\n\n\n

Managing your backups using the UpCloud API is really quite simple and easy to implement in any programming language with support for HTTP libraries. Check out the full API Documentation<\/a> to learn more about the features the UpCloud API offers.<\/p>\n","protected":false},"featured_media":27275,"comment_status":"open","ping_status":"closed","template":"","community-category":[109,120,122],"class_list":["post-24430","tutorial","type-tutorial","status-publish","has-post-thumbnail","hentry","community-category-upcloud-services","community-category-backups","community-category-api"],"acf":[],"_links":{"self":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/tutorial\/24430","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/tutorial"}],"about":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/types\/tutorial"}],"replies":[{"embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/comments?post=24430"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/media\/27275"}],"wp:attachment":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/media?parent=24430"}],"wp:term":[{"taxonomy":"community-category","embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/community-category?post=24430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}