You are viewing a single comment's thread from:

RE: Steem Followers - Status update

in #steemdev6 years ago

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 :)

Sort:  

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.29
TRX 0.12
JST 0.033
BTC 69831.92
ETH 3744.43
USDT 1.00
SBD 3.77