{"id":2041,"date":"2021-08-12T08:30:37","date_gmt":"2021-08-12T05:30:37","guid":{"rendered":"https:\/\/upcloud.com\/global\/us\/resources\/tutorials\/backup-mysql-upcloud-object-storage-simplebackups\/"},"modified":"2021-08-12T08:30:37","modified_gmt":"2021-08-12T05:30:37","slug":"backup-mysql-upcloud-object-storage-simplebackups","status":"publish","type":"tutorial","link":"https:\/\/upcloud.com\/global\/resources\/tutorials\/backup-mysql-upcloud-object-storage-simplebackups\/","title":{"rendered":"How to back up MySQL into UpCloud Object Storage using SimpleBackups"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/simplebackups.io\/\" target=\"_blank\" rel=\"noopener\">SimpleBackups<\/a> is an all-in-one website &amp; database backup automation service built for the cloud. It offers extensive support for databases such as MySQL, MongoDB and PostgreSQL as well as most cloud storage options. Furthermore, SimpleBackups allows you to quickly and easily store backups securely in UpCloud Object Storage.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Note: <a href=\"https:\/\/upcloud.com\/global\/products\/object-storage\">UpCloud Managed Object Storage<\/a> has replaced the legacy UpCloud Object Storage. Please refer to <a href=\"https:\/\/simplebackups.com\/blog\/how-to-backup-files-to-upcloud\/\" target=\"_blank\" rel=\"noopener\">SimpleBackups&#8217; guide on how to set up backup on the Managed Object Storage<\/a>.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">In this tutorial, we\u2019ll show how to use SimpleBackups to save MySQL database backups in UpCloud Object Storage.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To be able to utilise the services on both UpCloud and SimpleBackups, you will need to register on both. Begin by signing up for an account if you haven\u2019t yet.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Register on <strong><a href=\"https:\/\/my.simplebackups.io\/register\" target=\"_blank\" rel=\"noopener\">SimpleBackups<\/a><\/strong><\/li>\n\n\n\n<li>Sign up on <strong><a href=\"https:\/\/signup.upcloud.com\/\" target=\"_blank\" rel=\"noopener\"><span class=\"notion-enable-hover\" data-token-index=\"1\" data-reactroot=\"\">UpCloud<\/span><\/a><\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Once you\u2019ve created accounts on both platforms, continue below with creating your Object Storage.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. Create your UpCloud Object Storage<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Get started by logging in to your <a href=\"https:\/\/hub.upcloud.com\/object-storage\" target=\"_blank\" rel=\"noopener\">UpCloud Control Panel<\/a> and head over to the Object Storage section.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Object Storage has become the de-facto mass storage cloud solution thanks to its flexibility and connectivity options. It makes a great location to securely store your backups without worry.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Begin by clicking the <strong><a href=\"https:\/\/hub.upcloud.com\/object-storage\/2.0\/new\" target=\"_blank\" rel=\"noreferrer noopener\">New Object Storage<\/a><\/strong> button then make the following selections.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select the&nbsp;<strong>location<\/strong> for your storage. The number of locations available within the EU can help you comply with GDPR regulations if applicable.<\/li>\n\n\n\n<li>Make sure to keep the <strong>Public network access<\/strong>&nbsp;option enabled<\/li>\n\n\n\n<li><strong>Name<\/strong>&nbsp;your storage<\/li>\n\n\n\n<li>Select <strong>Yes, create a bucket now<\/strong>&nbsp;and finally give your bucket a name<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/1-simplebackups-upcloud-create-storage.png\" alt=\"Creating UpCloud Object Storage\" class=\"wp-image-22105\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When done, click the <strong>Create Object Storage<\/strong> button at the end of the configuration options.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You\u2019ll then get a note of the newly generated Access and Secret keys corresponding to your new Object Storage. Click the <strong>Download keys as .txt<\/strong> button and store them somewhere safe.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/2-simplebackups-upcloud-bucket-confirmation.png\" alt=\"New Object Storage keys\" class=\"wp-image-22106\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Good job,&nbsp;your UpCloud bucket is created! Open the Object Storage details by clicking its name in your UpCloud Control Panel.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then make note of the following details that you\u2019ll need later.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Bucket name<\/strong>, in this example \u201cbucket-sbio\u201d<\/li>\n\n\n\n<li><strong>Object Storage region<\/strong>, in this example \u201cnl-ams1\u201d<\/li>\n\n\n\n<li><strong>Object Storage endpoint<\/strong>, in this example \u201cmy-sbio-storage.nl-ams1.upcloudobjects.com.\u201d This can be found by clicking the <strong>S3 API access<\/strong> link in the object storage details.<\/li>\n\n\n\n<li><strong>Access and Secret keys<\/strong> are also shown in the notification for newly created Object Storage devices.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Note that once the notification is closed, you will need to generate new keys if you lose access to your Object Storage. So make sure to save your keys.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Create your MySQL backup<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s now go to SimpleBackups and\u00a0<a href=\"https:\/\/my.simplebackups.io\/\" target=\"_blank\" rel=\"noopener\">get that backup configured<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On the <strong>Create Backup<\/strong> screen, you are able to configure what data you\u2019re backing up, where you want it to be saved (in this case your UpCloud Object Storage), and how often you want this to be done.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Note that this section would be the same, no matter what backup storage you pick. And that\u2019s the beauty of it! If you want to change storage, just select another one from the list and you are good to go.<\/p>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/3-simplebackups-upcloud-create-mysql-backup.png\" alt=\"Creating MySQL backup job on SimpleBackups\" class=\"wp-image-22154\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Backup type and source server<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select \u201c<strong>Database<\/strong>\u201d (in this article we\u2019re creating a MySQL backup only)<\/li>\n\n\n\n<li><strong>Select the server<\/strong> on which your database is hosted<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If you haven\u2019t yet configured any server check our tutorial for <a href=\"https:\/\/support.simplebackups.io\/en\/articles\/3790279-get-your-server-configured-for-your-first-backup-the-simple-way\" target=\"_blank\" rel=\"noopener\">getting your server configured<\/a>&nbsp;first.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>How often should we make this backup?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select your&nbsp;<strong>schedule<\/strong> option. You can select a pre-defined schedule between daily, weekly, monthly, or a custom option. This allows you to schedule backups using standard CRON syntax.\n<ul class=\"wp-block-list\">\n<li>For example, a CRON schedule for \u201c20:00 every Tuesday\u201d would be&nbsp; <tt>0 20 * * 2<\/tt><br>In CRON syntax the numbers are set in the following order: <strong>minute<\/strong>&nbsp;0-59, <strong>hour<\/strong>&nbsp;0-23, <strong>day<\/strong> 1-31, <strong>month<\/strong> 1-12, <strong>weekday<\/strong> 1-7 and the star means every value in that range.<\/li>\n\n\n\n<li>Finally, the \u201cOn-demand\u201d option won\u2019t schedule anything but will allow you to trigger the backup manually or using our API.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Define <a href=\"https:\/\/support.simplebackups.io\/en\/articles\/4159469-what-is-a-backup-retention\" target=\"_blank\" rel=\"noopener\"><strong>backup retention<\/strong>,<\/a> which is the number of backups you want to keep. Depending on the frequency of your backups, retention determines the length of your backup history.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What files and folders would you like to back up?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select the type of your database, in this case, \u2018<strong>MySQL\u2019<\/strong><\/li>\n\n\n\n<li>Fill in the database connection details<\/li>\n\n\n\n<li>Validate this step. We\u2019ll make sure we can access these folders before moving to the next step.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Finalize and create<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Give your backup a <strong>name<\/strong> that will allow you to identify them in the SimpleBackups interface.<\/li>\n\n\n\n<li>Lastly, select the <strong>Storage<\/strong> where you want to save your backups, remote in this case. Then click the <strong>Connect a new storage<\/strong> button and continue with the instruction in the next section.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Connect your UpCloud Bucket<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To allow SimpleBackups to access your UpCloud Object Storage, you\u2019ll need to connect it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By selecting <strong>Remote storage <\/strong>and clicking the <strong>Connect a new storage<\/strong> button in the \u201cFinalize and create\u201d section you will then see the following configuration screen.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/4-simplebackups-upcloud-connect-bucket.png\" alt=\"SimpleBackups connection details\" class=\"wp-image-22108\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Where do you want to store your backups?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select&nbsp;<strong>\u201cUpCloud\u201d<\/strong>&nbsp;as the storage provider and fill in the \u201cConnect your storage\u201d form with the information from Step 1.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Connect your Storage<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Access Key<\/strong>: Your UpCloud Object Storage Access Key as described in the first section<\/li>\n\n\n\n<li><strong>Secret Key<\/strong>: Your Object Storage Secret Key as described in the first section<\/li>\n\n\n\n<li><strong>Region<\/strong>: The data centre your Object Storage is located<\/li>\n\n\n\n<li><strong>Endpoint<\/strong>: Storage endpoint described in step 1. Make sure not to include the bucket name but only the storage (as described in the helper).<\/li>\n\n\n\n<li><strong>Bucket<\/strong>: Bucket name described in step 1<\/li>\n\n\n\n<li>Then click the <strong>Validate<\/strong> button to test the connection<\/li>\n\n\n\n<li>Finally, give your storage a <strong>name<\/strong>. This can be anything but we like to use the Bucket name. Then click the <strong>Save new storage<\/strong>&nbsp;button to confirm.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Congratulations,&nbsp;you now have your MySQL database backed up on UpCloud!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run the backup job once manually using the&nbsp;<strong>Run<\/strong>&nbsp;snapshot button from the snapshots list. Running the job will trigger your first snapshot backup!<\/p>\n","protected":false},"author":56,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","community-category":[262,232],"class_list":["post-2041","tutorial","type-tutorial","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/tutorial\/2041","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/tutorial"}],"about":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/types\/tutorial"}],"author":[{"embeddable":true,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/users\/56"}],"replies":[{"embeddable":true,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/comments?post=2041"}],"version-history":[{"count":0,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/tutorial\/2041\/revisions"}],"wp:attachment":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/media?parent=2041"}],"wp:term":[{"taxonomy":"community-category","embeddable":true,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/community-category?post=2041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}