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":24910,"date":"2021-01-15T17:54:11","date_gmt":"2021-01-15T15:54:11","guid":{"rendered":"https:\/\/upcloud.com\/community\/tutorials\/downsize-object-storage"},"modified":"2021-01-15T17:54:11","modified_gmt":"2021-01-15T15:54:11","slug":"downsize-object-storage","status":"publish","type":"tutorial","link":"https:\/\/studiogo.tech\/upcloudold\/tutorial\/downsize-object-storage\/","title":{"rendered":"How to downsize Object Storage instance"},"content":{"rendered":"\n

Increasing Object Storage instance size is quick and easy using your UpCloud Control Panel, but downsizing doesn\u2019t work quite the same. Fortunately, it\u2019s a simple task to copy data from one Object Storage instance to another using rclone. In essence, to downsize the Object Storage instance, we will be deploying a new smaller one and copying the data across.<\/p>\n\n\n\n

This guide assumes that you have already created your new, smaller Object Storage instance that you wish to copy into. If you haven\u2019t, this can be done from your UpCloud Control Panel<\/a>.<\/p>\n\n\n\n

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

Step 1: Installing rclone<\/h2>\n\n\n\n

To start with, you\u2019ll need a server for running rclone to downsize Object Storage so deploy a new Cloud Server<\/a> of your choice. Rclone runs great on just about any Unix-based operating system but we\u2019ll be focusing on the popular OS options available on UpCloud.<\/p>\n\n\n\n

Once your Cloud Server is up and running, log into it using SSH to get started.<\/p>\n\n\n\n

First, update your package manager and ensure we have the necessary software.<\/p>\n\n\n\n

For Debian\/Ubuntu-based systems:<\/p>\n\n\n\n

sudo apt update && sudo apt upgrade -y\nsudo apt install -y curl unzip<\/pre>\n\n\n\n

For CentOS-based systems:<\/p>\n\n\n\n

sudo yum update -y\nsudo yum install -y curl unzip<\/pre>\n\n\n\n

Option 1. Installing via script<\/h3>\n\n\n\n

You can install rclone quickly and easily using their handy install script that works with most Unix operating systems:<\/p>\n\n\n\n

sudo curl https:\/\/rclone.org\/install.sh | sudo bash<\/pre>\n\n\n\n

Note that blindly executing scripts from the internet is not ideal and you need to be able to trust the script provider. If you\u2019re not sure about what you\u2019re running here, we recommend double-checking the install.sh<\/em> file before executing it.<\/p>\n\n\n\n

Option 2. Installing manually<\/h3>\n\n\n\n

Alternatively, you can install rclone manually by downloading the precompiled binary.<\/p>\n\n\n\n

First, download the binary package and unzip it to a convenient location. Then change into the resulting new directory.<\/p>\n\n\n\n

curl -O https:\/\/downloads.rclone.org\/rclone-current-linux-amd64.zip\nunzip rclone-current-linux-amd64.zip\ncd rclone-*-linux-amd64<\/pre>\n\n\n\n

Next, copy the binary file to the relevant location and set the permissions accordingly.<\/p>\n\n\n\n

sudo cp rclone \/usr\/bin\/\nsudo chown root:root \/usr\/bin\/rclone\nsudo chmod 755 \/usr\/bin\/rclone<\/pre>\n\n\n\n

Optionally, also can also install the manpage.<\/p>\n\n\n\n

sudo mkdir -p \/usr\/local\/share\/man\/man1\nsudo cp rclone.1 \/usr\/local\/share\/man\/man1\/\nsudo mandb<\/pre>\n\n\n\n

Once you\u2019ve got rclone installed, continue below with configuring rclone to copy the data in order to downsize Object Storage.<\/p>\n\n\n\n

Step 2: Configuring Object Storage Remotes<\/h2>\n\n\n\n

Rclone offers a simple and easy-to-read configuration file which we\u2019ll use to add our old and new Object Storage remotes, which rclone calls remote storage devices.<\/p>\n\n\n\n

Next, check the rclone.conf file location with the following command:<\/p>\n\n\n\n

rclone config file<\/pre>\n\n\n\n
Configuration file is stored at:\n\/root\/.config\/rclone\/rclone.conf<\/pre>\n\n\n\n

Then open the new file in a text editor. Note that the location of your configuration file may differ. Check the output of the previous command.<\/p>\n\n\n\n

nano \/root\/.config\/rclone\/rclone.conf<\/pre>\n\n\n\n

Enter the following example configuration and replace the details highlighted in red<\/span>. For example, <REGION> would be fi-hel2<\/tt> if your Object Storage is deployed in FI-HEL2.<\/p>\n\n\n\n

[OLD-OBJECTSTORAGE]\ntype = s3\nprovider = Other\nenv_auth = false\naccess_key_id = <ACCESS_KEY><\/span>\nsecret_access_key = <SECRET_KEY><\/span>\nregion = <REGION><\/span>\nendpoint = <ENDPOINT><\/span>\nlocation_constraint = <REGION><\/span>\nacl = private\n\n[NEW-OBJECTSTORAGE]\ntype = s3\nprovider = Other\nenv_auth = false\naccess_key_id = <ACCESS_KEY><\/span>\nsecret_access_key = <SECRET_KEY><\/span>\nregion = <REGION><\/span>\nendpoint = <ENDPOINT><\/span>\nlocation_constraint = <REGION><\/span>\nacl = private<\/pre>\n\n\n\n

You will need to edit the following in the above file:<\/p>\n\n\n\n

<ACCESS_KEY>:<\/tt> This should be your \"access_key\" for this Object Storage instance\n<SECRET_KEY>:<\/tt> This should be your \"secret_key\" for this Object Storage instance\n<REGION>:<\/tt> This is your region in lowercase<\/strong>, so for FI-HEL2 you'd use fi-hel2\n<ENDPOINT>:<\/tt> Your Object Storage endpoint URL, available from the \"S3 API Access\" link<\/pre>\n\n\n\n

The Access and Secret keys would have been presented to you when you created the Object Storages.
\"S3<\/p>\n\n\n\n

If you did not save the keys at the time when you created the Object Storage, you can regenerate them by clicking the Settings<\/em> button at your Object Storage details. Note that this will invalidate any previous keys which might have been in use on the old Object Storage instance.
\"S3<\/p>\n\n\n\n

Then scrolling down to the bottom of the Settings page where you\u2019ll find the Regenerate<\/em> button. After new Access and Secret keys have been generated, download the key file and store it somewhere safe.<\/p>\n\n\n\n

\"S3<\/figure>\n\n\n\n

Confirm the 2 new remotes are available to rclone:<\/p>\n\n\n\n

rclone config<\/pre>\n\n\n\n

If you see the following, you\u2019re all set:<\/p>\n\n\n\n

Name                 Type\n====                 ====\nNEW-OBJECTSTORAGE    s3\nOLD-OBJECTSTORAGE    s3<\/pre>\n\n\n\n

With the configuration done, the last step then is to actually copy the data. Continue in the next section on how to run rclone.<\/p>\n\n\n\n

Step 3: Downsize Object Storage<\/h2>\n\n\n\n

To copy your files between Object Storage instances we need a simple, one-line command:<\/p>\n\n\n\n

rclone copy --progress OLD-OBJECTSTORAGE:\/ NEW-OBJECTSTORAGE:\/<\/pre>\n\n\n\n

This will result in all data from the existing Object Storage instance being copied to the new one. You will see the progress thanks to --progress<\/tt> and once complete with no errors, you can confirm that all of your data has moved across successfully. When you are confident your data is intact on the new downsized Object Storage, you are free to delete your old, larger instance.<\/p>\n\n\n\n

Note that depending on the amount of data and the network between the locations, the migration might take some time.<\/p>\n\n\n\n

Running rclone in screen<\/h3>\n\n\n\n

Luckily, rclone is able to continue the operation in case the copy process is interrupted. But you may wish to set up a screen to run the process which allows you to close any SSH connections to the copying server without cancelling the process.<\/p>\n\n\n\n

First, check that screen is installed or install it if missing.<\/p>\n\n\n\n

# Debian and Ubuntu\nsudo apt install screen -y<\/pre>\n\n\n\n
# CentOS\nsudo yum install screen -y<\/pre>\n\n\n\n

Next, open a new screen with the following command.<\/p>\n\n\n\n

screen -U<\/pre>\n\n\n\n

Then run the copy in the new terminal screen.<\/p>\n\n\n\n

rclone copy --progress OLD-OBJECTSTORAGE:\/ NEW-OBJECTSTORAGE:\/<\/pre>\n\n\n\n

This way, you can leave the terminal by detaching the screen with ctrl+D and the copy operation won\u2019t be interrupted. Additionally, you can always resume a detached screen by using the following command.<\/p>\n\n\n\n

screen -Urd<\/pre>\n\n\n\n

That\u2019s it! You now have everything in place to copy data between your Object Storage instances.<\/p>\n","protected":false},"featured_media":19364,"comment_status":"open","ping_status":"closed","template":"","community-category":[127,128],"class_list":["post-24910","tutorial","type-tutorial","status-publish","has-post-thumbnail","hentry","community-category-managed-services","community-category-object-storage"],"acf":[],"_links":{"self":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/tutorial\/24910","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=24910"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/media\/19364"}],"wp:attachment":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/media?parent=24910"}],"wp:term":[{"taxonomy":"community-category","embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/community-category?post=24910"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}