From seeing discussions on Twitter, it’s clear that some Roam users don’t know how to backup and that other Roam users may know how but aren’t actually doing it.
The purpose of this lesson is not just to show you how to back up. The aim is also to give you the motivation to back up if you’re not doing it regularly.
The more you use Roam, the more it becomes a critical part of your second brain.
Think of all the ideas, resources, contacts, information and to dos in your Roam database. And think of all the time, effort and concentrated thinking that you’ve spent on building it up.
If you were to lose a day’s worth of work in Roam, that would be incredibly inconvenient. But if you were to lose 3 or 6 month’s worth of data in your Roam database, that would probably be verging on the catastrophic.
And while the prospect of that happening is very unlikely, it makes sense to guard against it.
Table of Contents
- Why backup
- Different backup formats
- How often should you backup?
- Deciding on a backup solution
- How to backup
There are two potential danger areas: firstly, at Roam’s end, and, secondly, at your end.
Potential issues at the Roam end
There are two potential issues at the Roam end:
- Infrastructure issues
- Business survival.
Infrastructure: Earlier in the year, when there was a huge influx of new users into Roam, the infrastructure couldn’t cope and some people lost data. Since then, the infrastructure has been upgraded and these problems seem to be in the past.
Business survival: Another potential danger is that Roam might go out of business. However, the healthy revenue figures recently announced by co-founder Conor White-Sullivan mean that a long future for Roam seems assured.
Potential issues at the user end
The risk of data loss is probably greater at your end. While unlikely, it’s possible that a hacker gains access to your Roam database via your desktop, laptop or cellphone and deletes some or all of your files.
More likely is the accidental deletion of important pages or blocks. (For example, a recent experience of being distracted when in the midst of a cut and paste operation meant that some vital blocks were cut but then didn’t get pasted. Having a recent backup meant that the missing blocks could be restored as soon as I noticed they were gone.)
Roam allows backups in two formats:
- Markdown, which is a human-friendly text format
- JSON, which is a computer-friendly data format.
It’s important to backup in both formats because they have different uses.
Markdown backups create a file for each Roam page. So, if you’ve mistakenly deleted a page or block, you can go directly to the missing file and easily retrieve the missing text.
This is what a backed up Markdown file looks like when it’s opened in a Markdown editor. It’s easy to read and very like what you see on a Roam page.
However, your Markdown backup would be useless if you wanted to import your backup to a new Roam database or restore it to your existing Roam database. This is because Roam only allows the import of 10 Markdown files at a time.
To import a Roam database, you need to use a JSON backup.
Instead of multiple files like the Markdown backup, your whole Roam database is backed up in one JSON file.
As you can see below, it’s completely unreadable. It mixes up the written text with metadata such as the date and time of block creation and editing, and the email address of the block creator and editor.
So, when you back up, it’s very important that you do in both formats in order to meet the different needs you may end up having.
How often you should backup depends on how regularly you use Roam and on the potential seriousness of any data loss to you.
However, if you are working in Roam each day, it seems good practice to also make backups daily.
The automatic backup solution described below makes backups hourly as a default, although this can be changed.
There are two backup solutions: manual and automatic. Neither of the solutions are ideal and it’s likely that automatic backups will be integrated into Roam at some point in the future.
Both solutions have their pros and cons.
- The process is simple to implement.
- You have to remember to back up regularly (which can be done either by creating a new habit or by setting up an ongoing calendar reminder). However, if you forget to do it, you may not have a recent backup when you need it.
- Once the automatic backup procedure has been set up, your backups happen automatically without you having to do anything.
- It’s more time-consuming and more complex to set up.
- It means your backups and your Roam login information are stored on the cloud on Github, which some people may be uneasy about for privacy reasons.
2. Click on ‘Export All’.
3. Export the Markdown backup first by clicking on ‘Export All’.
4. a) Navigate to where you are saving the backup. It can be helpful to add backups to dated folders so it’s easy to find them again.
b) Click on ‘Save’.
5. To go back and save a JSON version of your backup, repeat steps 1-4.
6. When you get to the ‘Export All Pages’ screen, click on the downward arrow and then click on ‘JSON’.
7. Click on ‘Export All’ and then follow Step 4 above to save the JSON backup to your hard drive.
The detailed procedure for automatic backups has been added to a new page as it is quite lengthy. It can be found here.
Automatic backup process summary
- The backup process uses Matthieu Bizien’s roam-to-git code, which is hosted on GitHub.
- Your backups are saved in a Github repository.
- The repository needs to be configured to allow it to log in to your Roam database and take backups.
- A workflow is then set up to take regular backups of your Roam database.
- You can access these backups to look at or download.
- Set up a GitHub account or login to your existing one.
- Create a new repository.
- Add in the details of your Roam database and your login information.
- Create a GitHub Action with the roam-to-git code to run the backup process.
- Check that the process is working.