You are viewing a single comment's thread from:

RE: Steem Followers - Status update

in #steemdev6 years ago

Hey @shaunmza, great work on your followers app, sorry you've had some troubles!

According to your post here it looks like you're using MySQL.

You just mentioned:

an incremental backup strategy is of the highest importance

So I wanted to suggest this MySQL Backup Script I wrote that should help you out.

You can easily deploy a backup instance at DigitalOcean using this script instead as the User Data like I outlined here and have offsite backups running in a couple minutes!

I wanna support the Steemit community, especially those like you building on the blockchain, so let me know if you'd like some help implementing a backup plan, or really however I might help.

Sort:  

Looks good, I resteemed it too.

Let me know if you do something similar for an incremental backup too?

The database will be quite big, so backing the full database up will take a ton of time, especially on a small DO droplet like I use.

What I am thinking of is a full backup once a week, with incrementals every 12 hours or so.

Nice work though :)

Thanks for the resteem!

So, your best bet is to deploy a small droplet (like really, just $5/month) and then attach Block Storage to that instance. The storage is only $0.10/GB per month and you can expand that as your storage grows.

My script literally grabs everything, every table in every database. Like you said, that's probably overkill for your needs but you can tweak it some to fit your scenario. You can easily dump specific tables rather than the full db, which might fit a little better.

For the blockchain data, the full weekly and 12 hour incrementals makes perfect sense. For the incremental, a quick approach is to just use the mysqldump where clause to limit your dump for your incrementals.

mysqldump -h mysql_host -u mysql_user -pmysql_password db_name specific_table1, specific_table2 --where="timestamp > DATE_ADD(CURRENT_TIMESTAMP, INTERVAL -12 HOUR)"

You'll need to specify exact table names for a dump like this so you might have a couple separate mysqdump calls.

As you move this forward, seriously let me know if you have any questions!

For your app data itself, that I would recommend backing up constantly, at least daily. While it takes a few weeks, the blockchain data can always be reproduced, but the app data is gone.

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.032
BTC 61227.60
ETH 3022.96
USDT 1.00
SBD 3.88