NunDb How to backup one or all databases
NunDB is an in-memory database that means we store all the data mainly in memory for speed (this helps keep NunDb fast). The obvious drawback is that if you are hosting your own NunDb and you have a server restart or need to stop it for any reason, you may lose what is in memory.
To solve that problem and at the same time keep NunDb as fast as possible, we created the command Snapshot
to save to disk the current state of the database. Snapshots are heavy operations, and you should not perform them at every command. It will run asynchronously. Once you send the snapshot command a few seconds later, the database will save it to disk. NunDb reads the snapshots at startup time. From that point, all operations are executed in memory.
How to backup one database?
To back up only one database, all you need to do is to execute the command snapshot in the db instance. With that, db will do a snapshot in all cluster instances.
How to backup all databases with one single command
With a simple combination of commands, you can backup all the databases. Here we list the databases from the $admin
database using the keys
command, filter it with grep and tail, then use xargs to call the backup for each database.
- Code Coverage for Rust Projects with GitHub Actions
- NunDb is now referenced in the Database of Databases
- Real-time Medical Image Collaboration POC Made Easy with OHIF and Nun-db
- How to create users with different permission levels in Nun-db
- Match vs Hashmap! Which one is faster in rust?
- Towards a More Secure Nun-db: Our Latest Security Enhancements
- Building a Trello-like React/Redux App with NunDB with offline and conflict resolution features
- Introduction to managing conflicts in NunDB
- Keepin up with Nun-db 2023
- The new storage engine of Nun-db
- Stop procrastinating and just fix your flaky tests, it may be catching nasty bugs
- An approach to hunt and fix non-reproducible bugs - Case study - Fixing a race conditions in Nun-db replication algorithm in rust
- NunDB the debug command
- Keeping up with Nun-db 2021
- Writing a prometheus exporter in rust from idea to grafana chart
- Integration tests in rust a multi-process test example
- Leader election in rust the journey towards implementing nun-db leader election
- How to make redux TodoMVC example a real-time multiuser app with nun-db in 10 steps
- A fast-to-sync/search and space-optimized replication algorithm written in rust, The Nun-db data replication model
- NunDb How to backup one or all databases
- How to create your simple version of google analytics real-time using Nun-db
- Migrating a chat bot feature from Firebase to Nun-db
- Keepin' up with NunDB
- Going live with NunDB