Jump to content

Automated cloud database backup


Habilis

Recommended Posts


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  31
  • Reputation:   14
  • Joined:  06/13/16
  • Last Seen:  

It is a custom backup solution I've been working on, Thanks to feedback of community, I managed to make a V2

 V2 of my Database Backup solution

 

Featuring

 

1. generate a backup of databases specified in a list
2. Name them with yyy-mm-dd[DatabaseName] format
3. Compress them into .7z using maximum compression
4. Set a password on .7z archive
5. Send them to cloud storage Google Drive
6. Write logs
7. Removes all compressed backups 28 days or older (keeping local folder nice and clean)
8. Can be automated with cron to run even every 12 hours

 

 

ZXDtdho.jpg

 

 

Ow yeah, Don't worry about someone hacking your GoogleDrive, if you put 14 character+ Alphanumeric password on yout backup archives it is going to be bruted loong time...

 

 

  • Upvote 3
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  171
  • Reputation:   15
  • Joined:  01/26/12
  • Last Seen:  

this is amazing. specaily for someone using onedrive.

 

 

Edited by sikiro
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  31
  • Reputation:   14
  • Joined:  06/13/16
  • Last Seen:  

5 minutes ago, sikiro said:

this is an amazing guide +1 is google drive the only option to upload to can someone use box or one-drive for example?

Thanks for the +1!

 

Absolutely not only Google Drive, in the guide I provide a link to rclone github, cool guys, you should check them out!

https://github.com/ncw/rclone

 

They have a list of all remote options supported (If you are by any chance Russian, they Even support Yandex Disk, amazing isn't it?)

Quote
  • Google Drive
  • Amazon S3
  • Openstack Swift / Rackspace cloud files / Memset Memstore
  • Dropbox
  • Google Cloud Storage
  • Amazon Drive
  • Microsoft OneDrive
  • Hubic
  • Backblaze B2
  • Yandex Disk
  • SFTP
  • The local filesystem

 

Edited by Habilis
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  171
  • Reputation:   15
  • Joined:  01/26/12
  • Last Seen:  

so your guide will work reguardless of what i pick tho right?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  31
  • Reputation:   14
  • Joined:  06/13/16
  • Last Seen:  

Yes, I don't see why it wouldn't.

It's just the matter of being able to configure your favorite remote cloud service with rclone.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  171
  • Reputation:   15
  • Joined:  01/26/12
  • Last Seen:  

yeah works great only hicup is i only allow ssh for my remote server so when getting the authentication code im stuck unless i use interface unless you know a way to do it on putty. and p7zip on centos 7 doesnt seem to be available.

 

Edited by sikiro
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  31
  • Reputation:   14
  • Joined:  06/13/16
  • Last Seen:  

Of course! I did mine in Putty.

 

When it gives you the link to goto you highlight it and right-click. (it is paste in putty)

this will paste the link in the console, erase it. 

But it will also copy it.

Now you can paste it in your browser CTRL+V on Wind0z machine and authenticate

Then copy CTRL+C the Verification code and right-click in putty to paste it.

Edited by Habilis
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  171
  • Reputation:   15
  • Joined:  01/26/12
  • Last Seen:  

got it thank you! 

 

Suggestion for this would be nice to be able to backup emulator as well.

Edited by sikiro
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  31
  • Reputation:   14
  • Joined:  06/13/16
  • Last Seen:  

Ow sorry I didn't see about 7zip on CentOS

wget https://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/6/x86_64/p7zip-16.02-1.el6.x86_64.rpm
sudo rpm -U --quiet p7zip-16.02-1.el6.x86_64.rpm

The guide is actually for Debian / Ubuntu systems, well if you manage to get it working on CentOS, It would be awesome!

Edited by Habilis
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  171
  • Reputation:   15
  • Joined:  01/26/12
  • Last Seen:  

it worked perfectly fine on centos for 7zip you need to install the plugins for it on centos 7 or it will not function is it posible to make it so that you can  backup the emulator as well?

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  31
  • Reputation:   14
  • Joined:  06/13/16
  • Last Seen:  

Unfortunately, I'm not a CentOS guy, try 7zip without plugins.

 

And yes it's absolutely possible to backup Emulator as well.

Just Google it up how to add a folder to archive and send it to Cloud with rclone as well.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  171
  • Reputation:   15
  • Joined:  01/26/12
  • Last Seen:  

no im saying it works if u use the plugins its working perfectly right now.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  31
  • Reputation:   14
  • Joined:  06/13/16
  • Last Seen:  

Ah ok, Cool!

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   431
  • Joined:  01/26/16
  • Last Seen:  

Another cheap alternative for larger servers: Google Cloud Storage Nearline

I used to back up my files to this when I was doing stuffs in the Minecraft scene.

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  99
  • Reputation:   2
  • Joined:  02/23/14
  • Last Seen:  

On 5/5/2017 at 8:28 PM, Habilis said:

It is a custom backup solution I've been working on, Thanks to feedback of community, I managed to make a V2

 V2 of my Database Backup solution

 

Featuring

 

1. generate a backup of databases specified in a list
2. Name them with yyy-mm-dd[DatabaseName] format
3. Compress them into .7z using maximum compression
4. Set a password on .7z archive
5. Send them to cloud storage Google Drive
6. Write logs
7. Removes all compressed backups 28 days or older (keeping local folder nice and clean)
8. Can be automated with cron to run even every 12 hours

 

 

ZXDtdho.jpg

 

 

Ow yeah, Don't worry about someone hacking your GoogleDrive, if you put 14 character+ Alphanumeric password on yout backup archives it is going to be bruted loong time...

 

 

How to setup on CentOS.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...