How to back up Markdown notes and test the restore
Back up Markdown notes by copying one folder: Time Machine or File History, a dated zip, rsync or restic, an offsite copy, and a restore test you actually run.

To back up Markdown notes, back up the folder that holds the .md files. Turn on your system's backup (Time Machine on a Mac, File History on Windows, a tool such as Déjà Dup or restic on Linux) and make sure the notes folder is included, then keep one more copy somewhere else, such as a second drive or an encrypted cloud backup. Because notes are small text files, a full backup takes seconds and costs almost no space. The step people skip is the restore test: open a file from the backup once a month.
Below is a checklist, the commands for each system, a small script for dated archives, and how to check that a backup actually works.
Why is a sync folder not a backup?
Because sync copies mistakes as faithfully as it copies good changes. If you delete a note or overwrite a paragraph in a synced folder, the deletion reaches every device within seconds. A backup is a separate copy that your everyday edits do not touch.
| Sync folder | Backup | |
|---|---|---|
| Purpose | Same files on every device | Older versions you can return to |
| A deleted note | Deleted everywhere | Still in the backup |
| A corrupted file | Corruption spreads | Earlier copy kept |
| Version history | Limited, depends on the service and plan | As long as you keep it |
| Needs your action to restore | Sometimes | Yes, and you should practise |
Many cloud drives keep deleted files and older versions for a while, which helps. Treat that as a safety net, not as your backup, since the retention period depends on the service and plan. For the reasoning behind keeping several copies, see how to future-proof your notes.
What should a notes backup plan include?
Four things, in this order:
- One automatic local backup, running without you, to a drive you can reach in minutes.
- One copy in another place, so a fire, theft or a failed laptop does not take everything.
- Version history, so you can go back to last Tuesday, not only to last night.
- A restore test, on a schedule, because a backup you have never restored from is a guess.
Notes folders are small. A few thousand Markdown files are often well under 100 MB, so even a basic external drive or a free tier of an online backup holds years of versions.
How do you back up notes on a Mac?
Use Time Machine. Connect an external drive, then open System Settings > General > Time Machine and add the drive as a backup disk. Time Machine backs up your home folder by default, which includes a notes folder in Documents or your home directory, and it keeps hourly, daily and weekly versions as space allows.
To restore one note, open the notes folder in Finder, then open the Time Machine app (or choose Browse Time Machine Backups from its menu bar icon). Go back to the date you want, select the file and click Restore.
If your notes are in iCloud Drive with "Optimize Mac Storage" turned on, some files may exist only in the cloud and not on the disk Time Machine sees. Either keep the notes folder outside iCloud Drive, or turn off optimization so the files are stored locally.
How do you back up notes on Windows?
Use File History, which keeps versions of files in your user folders on an external or network drive. Open Control Panel > System and Security > File History, select a drive and turn it on. It covers folders such as Documents and Desktop, so keep your notes folder inside one of them.
To restore, open the notes folder in File Explorer, right-click a file and choose Restore previous versions, or use Restore personal files in File History to browse by date.
For a plain copy to an external drive, robocopy is built in:
robocopy "%USERPROFILE%\Documents\Notes" "E:\Backup\Notes" /MIR
/MIR makes the destination an exact mirror, which includes deleting files there that you deleted from your notes. Use it for a second copy next to File History, not instead of it, because a mirror alone has no history.
How do you back up notes on Linux?
Ubuntu and many other GNOME desktops include Déjà Dup (shown as Backups), which runs scheduled, versioned backups to a local drive or network location. For a command line setup, restic is a widely used option that encrypts, deduplicates and keeps snapshots:
restic init --repo /media/backup/notes-restic
restic --repo /media/backup/notes-restic backup ~/Notes
restic --repo /media/backup/notes-restic snapshots
Restore one snapshot to a separate folder, so you can compare before you overwrite anything:
restic --repo /media/backup/notes-restic restore latest --target /tmp/notes-restore
On any system, rsync makes a fast plain copy to another drive:
rsync -a ~/Notes/ /media/backup/Notes/
The trailing slash on ~/Notes/ copies the folder's contents rather than nesting it. Adding --delete mirrors deletions too, with the same warning as robocopy /MIR.
How do you make dated zip archives of notes?
A dated archive is the plain way to keep monthly snapshots anywhere: a USB stick, a second cloud account, or an email to yourself. On macOS and Linux:
cd ~
zip -rq "notes-$(date +%F).zip" Notes -x "*/.DS_Store"
That creates a file such as notes-2026-11-26.zip. On Windows, in PowerShell:
Compress-Archive -Path "$env:USERPROFILE\Documents\Notes" -DestinationPath "E:\Backup\notes-$(Get-Date -Format yyyy-MM-dd).zip"
Keep the last twelve monthly archives and delete older ones, or keep one per year forever. Text compresses well, so the archives stay small.
If you already use Git, a pushed repository is also an offsite copy with full history. Git for notes covers the setup and how to restore a deleted note.
How do you test that a backup works?
Once a month, or after you change your setup, restore a few files and open them:
- Pick three notes: one recent, one a few months old, one with images or attachments.
- Restore them from the backup to a temporary folder, not over the originals.
- Open each one in an editor and check the text and the links to images.
- Check the backup's date. If the latest copy is older than you expect, the schedule has stopped.
- Write the date of the test in a note, such as
backup-log.md, so you know when you last checked.
The most common failure is not a broken backup but a missing one: the drive was unplugged for three months, or the notes folder was moved out of the backed-up location.
Backing up notes from Noteline
Noteline, which we make, has no server copy of your notes, so backing them up is a matter of backing up files. On desktop, notes are .md files in the folder you chose, and every method above works on that folder. In the mobile apps, Export all notes packs every note into a .zip you can share or save; on Android, do this before uninstalling, because Android removes the app's storage with it. Where Noteline notes are stored lists the exact location for each platform.