ChastiKey Forums

General Category => General Chat => Topic started by: paigeq on July 09, 2018, 12:47:11 PM

Title: Server backups
Post by: paigeq on July 09, 2018, 12:47:11 PM
Hey Kevin,

Firstly can I start by saying what an excellent App you've developed here, it's great work and i'm really enjoying playing with it. I hope that you're making some money from it, and it's building nicely. I'd definitely say - keep marketing the hell out of the product.

Now, quick Q. There are a lot of guys using your app to keep there dicks secured. I'm wondering what you have in place to keep the server component backed up and what would happen in the event of a disaster in your infrastructure? Could you recover the current lock position and codes if something like this happened?

I'm very aware that this sort of thing can and does happen regularly when you're dealing with servers, so I thought I'd check it with you to put people's minds and, indeed, cocks, at rest!

Title: Re: Server backups
Post by: KevinCross on July 09, 2018, 12:53:50 PM
@paigeq the tables are backed up daily. I have an old hosting account with GoDaddy. Too old for access to cPanel so I don't get any of the automated backups that come with that. I've got a crontab script that runs daily that exports the tables to backup files. The backup files are dated too so they don't get overwritten. Thankfully in the two years it's been running I've not had a problem but of course the more users it attracts the more chance something will go wrong or someone does something naughty that damages the tables.

You should always have a backup plan yourselves as well. That's one reason why I say don't put your safe keys in the safe with your cage keys
Title: Re: Server backups
Post by: paigeq on July 09, 2018, 01:02:38 PM
Got it, all sounds good. Are your backups off-site to S3 or something?

Sounds like DR might take you a day or two to recover from, but that's not the end of the world, in fact would be part of the fun!
Title: Re: Server backups
Post by: mself111 on July 09, 2018, 01:09:40 PM
I tried hard to do not engage. (I couldn't)

By definition, a DR solution implies no data recovery at all. Data is written synchronously on 2 or more locations to prevent unavailability.
Title: Re: Server backups
Post by: KevinCross on July 09, 2018, 01:18:18 PM
I have to admit the files are only backed up in a folder on the same server.

They're not saved in a second location like a backup drive/tape. I can look into how easy it would be to get the backups saved somewhere else too.
Title: Re: Server backups
Post by: paigeq on July 09, 2018, 01:59:47 PM
It's definitely worth it. You can install s3cmd to easily sync a directory over to an S3 bucket.

From memory on my boxes

apt-get install s3cmd

should work just fine, but maybe you need to add in another repository:

Then set up your AWS bucket (probably your usage will come under the free tier anyway) and set up your script to sync the directory.  Should be pretty easy then you can rest easily. If you do have a drive failure (we get them regularly, especially once a machine his 4 years of age). The main issue is losing all your customer and commuity history

@mself111 +7 red for pedantry!

Title: Re: Server backups
Post by: DrDave on December 03, 2018, 09:11:10 PM
Suppose a crash made your 4 digit code dusappear....
At 3 seconds per try trying all possible combinations would take 30,000 seconds that's 8 and a third hours.  So it would not kill you if the whole system were to disappear.  Many of the locked, if the started right now could get out sooner without the combination reveal.  The system is a way to keep the honest honest.
Title: Re: Server backups
Post by: sweh on December 04, 2018, 03:11:15 AM
If you want to do cloud copies of your backups then "rclone" ( is a great program.  It's kinda like rsync, but for cloud endpoints (google drive, S3, etc etc).  I use it to keep offsite copies of my backups, via a cron job.  "It just works"
Title: Re: Server backups
Post by: FreeWilly on January 23, 2019, 05:17:00 PM
In addition to daily database backups, each new key could be appended to a daily, delimited file on an external drive. Something like: date, userID, lockID, combination.

Also, in practice, it takes more than 8 hours to try all the combination to a 4-digit box. I had to do that once for my Master lock box. My finger got sore trying the black latch after the first few hundred tries. I had to spread it out over 3 days.