Sunday, February 14, 2016

Backup Plan...9 from Outer Space

How to make backups of your neo4j database on GrapheneDB DaaS

If you have a professional plan with GrapheneDB DaaS, then backups, for you, are automated. At the lowest professional tier, backups are only retained for a week, so continue to read the rest of this article for methods for saving data longer-term.

For the hobby-edition owners you get the following message:

Does this mean you are unable to make backups of your database? It appears so, at the face of it, but actually, no, you can make backups, and you can do this daily. The effort is on your side, but when it comes to the case that you've corrupted your database with a dirty load (as I have), these backups are an essential part of restoring integrity to your stored data.

So, let's do this.

How?

You export your database, and then you find some cloud-service to manage these daily exports, or, again, you take on the management of these exports. These exported copies of your database are, ipso facto, your daily backups.

To export your database, go to the Admin-tab and go to the "Export Database"-section. 


Select "Export Database," read the warning about database-stoppage, and select "Export Database," again.



Then, you're moved onto the next modal dialog – "Export Ready" – which offers a download of a snapshot of your database. Select "Download."

Boom! A snapshot of your database is now local. As you see at the bottom of your web-browser in your task-status bar:

Now that you have the snapshot, select "Close" on the modal. Officially, you're 'done.'

Now, what you do with it is up to you. You can move it to a hard medium (e.g.: DVD-RW, or shared network drive), or you can upload it to a cloud service, such as AWS S3 or your google drive. Your choice.

Backup management plan

Of course, you can save every daily backup forever, but what works best? From experience, the older the data gets, the less interesting it gets, so what I do is save the dailies for a week, then, beyond that, I save the first of every prior week up to a month (that is: I delete every non-monday backup older than a week), I save every first of month older than two months, then I save the first of the year. Usually, one finds a mistake the same day one makes it, so the rollback is one, two, or three days. Usually. Everything beyond immediacy is just paranoia, in my experience, so, out of paranoia I save data every month for a year and beyond that, every year. Once, twice or thrice, I've had to look in the archives older than a year to try to restore something I've lost. Oftentimes, the trouble of restoration is so great, I always say 'eh, whatevs,' anyway.

But, you know: saving older data, because reasons, and because everybody does it, so it Must Be Vital for my Health and Well-Being(tm).

As a point of reference the GrapheneDB DaaS saves one week of daily backups. Anything older than a week is discarded.

Nice to see some realists in the technology sector for a change.

No comments:

Post a Comment