Export, copies and sync

Guide

How to get notes out of burl, hand a copy of a notebook to another machine, and bring changes back. For people using the desktop app; the command-line equivalents are noted where they exist.

Export

Menu F10 offers three exports (SQL, Markdown, and a copy without attachments) and Publish HTML..., each into a file or folder you choose. The window stays usable while it runs and the footer shows "exporting...".

Attachments missing from such a copy show as "absent" in the ATTACHMENTS section. burl-backend rehydrate fetches them back from a host that has them; there is no menu entry for that.

Hand a copy to another machine

To open your notebook on a second computer, choose menu F10 > Serve, which opens the "Serve, pull or send" panel. Start shares a frozen copy of the open notebook. The panel shows an address, a fingerprint and a six-digit code that changes every 30 seconds. The other computer needs the address and the current code.

The fingerprint the panel shows belongs to this computer's serve key. burl creates the key the first time you serve and reuses it every time after. A computer that pulls from yours remembers the fingerprint, and refuses a later pull if it changes. The transfer is not encrypted, and anyone who sees the code can fetch the notebook. The command line equivalent is burl-backend serve. At a terminal it prints each new code as it changes. Run anywhere else, such as from a systemd unit, it prints no codes, because anyone who can read that output could use them. Run burl-backend code to see the current code, or add --print-code to print them anyway.

What serving on the network announces

While burl serves with the LAN box ticked, it announces itself with mDNS, the way printers are found on a network. Other burls then show it in their "On this network" list, described below. Anyone on the same local network can see:

The notes themselves and the code are never announced. Routers do not forward the announcement, and burl answers a question for it only from a computer on your local network: a computer that reaches yours across a router or over a VPN gets no answer. Two setups count as local anyway. A virtual network that behaves like a LAN, such as ZeroTier, is local to burl, and a router set to relay mDNS between networks passes on questions from every network it relays.

When you click Stop, burl tells the network it has stopped, and other burls with the list open drop your notebook from it about a second later. Opening another notebook or quitting burl stops serving the same way. If burl stops without telling the network, for instance because it crashed, other lists mark it not answering within about 40 seconds instead.

If your computer's address changes while burl serves, as when a laptop joins another Wi-Fi network or a dock, burl announces the new address within about 5 seconds, and other lists show your notebook at it. While your computer has no network, burl announces nothing, and starts again when the network returns.

If the LAN box is unticked, or you never serve, burl announces nothing. No setting serves on the network without announcing. On a shared or public network, leave the LAN box unticked: the transfer is not encrypted, and ticking it also tells everyone on the network the notebook's name.

Pull from a host

In the same panel, type the host's address and code and click Pull, then Fetch. The copy is downloaded and the import preview opens. Instead of typing the address, you can pick the host from the list under the code field.

The "On this network" list

The Serve, pull or send panel with nothing typed yet. Under the address and code fields, the On this network list reads "next look in 12 s" beside a Look again button, and lists three rows: "burl on pauls-mbp (Qm9u)", "notes on nixos (ab12)" and "notes on nixos (c7E0)", each with its address and port 7373 below it and the tags LAN and unverified at the right.

On this network lists the burls announcing on your network. It also lists each host you have pulled from before, if the host answers when burl tries it. A row such as "notes on nixos (ab12)" gives the notebook's file name, the computer's name, and the first four characters of its serve key's fingerprint. The line under it is the address and port. The list asks the network over and over while it is open, and each round of asking is called a look.

The tags at the right say where a row came from, and whether it still answers:

The other rows are also tagged unverified, except the one you are pulling from or sending to, which shows pulling or sending. A row is unverified because any computer on the network can announce any name. In the picture, the two "notes on nixos" rows have different fingerprints, ab12 and c7E0, so they are two different computers. A row tells you only that a burl claims that name. The code is still what lets you pull, so read it off the other computer's screen or get it from the person whose notebook it is.

Click a row and burl fills in its address and moves the cursor to the code field. Type the code, then click Pull and Fetch as usual. While a fetch runs, rows ignore clicks. burl hides any row that carries this computer's own serve key, so your own server is not listed.

A look lasts 3 seconds. The first starts when the panel opens, and another starts 15 seconds after each one ends. Look again starts one now, and is grayed out while one is running. While the panel is open, burl listens on UDP port 5353 for announcements and connects to each recent host to see whether it is still there. When the panel closes, it stops listening and starts no new connections.

When a look finds nothing, the list shows one of three reasons:

Under each reason, the list says how many recent hosts it tried and that none answered, or, if you have never pulled, that there are none to try yet.

burl keeps the hosts you have pulled from in a file called recent_hosts, in burl's settings folder (see Settings and the command line). It is updated each time a pull finishes. Delete the file to forget them.

Send to a host

To send the open notebook to a computer that is serving, use the same panel. Type the host's address and code, or pick the host from the list, and click Send. burl first asks the host what history the two notebooks share. Nothing is sent to a host that shares none. The panel then shows the host's fingerprint and what will be sent, and the button reads Send now. While the copy uploads, the panel counts what has gone, and Start and Pull wait.

The host merges what arrives straight away. Changes that do not conflict land in its notebook. A line changed on both sides keeps the host's text and waits in the host's conflicts list, and the panel says how many are waiting. A fork is the usual thing to send home this way.

The host must be serving with "Let other devices send changes back" ticked; otherwise it refuses, and the panel says what to tick on that computer. If nothing answers at the address, nothing is sent, and the panel names the route that needs no network: copy the file to that computer and use Import from a copy... there. Command line: burl-backend send.

Serve several notebooks from one place: the router

Serve shares the notebook that is open. To keep several notebooks available to your phone and other computers all the time, without a window open on each, attach them to the router: one background service that serves every attached notebook on one port (7374), each at its own address, /n/ and the notebook's name, and each with its own six-digit code. The code for one notebook opens no other. The command line is burl-backend router; the router window and, on a Mac, the second app burl router manage it without typing.

Open port 7374 in the firewall of the computer that runs the router, or a phone on your network gets "No answer" and nothing is sent. Plain serve uses port 7373, so a firewall rule that lets serve through does not cover the router. On NixOS, add the port to /etc/nixos/configuration.nix and rebuild:

networking.firewall.allowedTCPPorts = [ 7374 ];

Other firewalls need the same rule for TCP port 7374.

The router window is burl-router. It comes in the Linux tarball and in the Nix package, beside burl-ui. It lists the attached notebooks and their state, and its header says where the service listens, who can reach it and for how long it has been up.

On Linux the window is in your applications menu as burl router, with burl's icon: install.sh and burl-register-desktop add it beside burl's own entry, and install.sh --uninstall takes it out. With Nix, nix run 'git+https://git.sr.ht/~ninjapanzer/burl#install-router' adds only the router's entry, pointing at a link Nix keeps and does not collect; run it again after an upgrade. A new entry that appears after nix profile upgrade may not show in your desktop's panel or applications menu until you log out and back in, or restart the panel (on Budgie, budgie-panel --replace). The entry only opens the window: it does not start the service at login. For that, run the service as a systemd user unit (homeManagerModules.burl-router sets one up).

On a Mac, the zip carries burl router.app beside burl.app, with an icon in the menu bar. Its menu opens the router window and starts or stops the service. Start at login is off until you tick it; ticking it installs two launch agents, and unticking removes them. Quit burl router stops the service too, and it stays stopped. INSTALL.txt in the zip says how to install it.

A router that runs without a window cannot show a pairing request, so pair a phone from a terminal as yourself: burl-backend router pairs lists the requests, and accept and refuse answer them. A pairing belongs to one notebook: a phone paired with one notebook of the router is not paired with the others, and is paired again for each. The router also compacts a notebook it serves when it stops, or when burl-backend router compact asks. Every command is in burl-backend(1).

To share one note and what belongs with it, rather than the whole notebook, right-click the note and choose Fork.... The dialog lists what goes in the fork, with a count beside each box: the note's children, the notes it links to, the notes that link to it, and this notebook's guidance for the note, including what the notes above it say. It names the notes before anything is written. Fork writes a new .burl holding only those notes. The window stays on this notebook, and the footer names the file and how many notes it holds.

In the fork, notes that came only because they are linked sit in a folder note, Linked from home. Files attached to those notes go with them; a shortcut to a file elsewhere on this computer does not. A link to a note that was left out stays in the text and shows as missing. The guidance sits on the fork's top note, where GUIDANCE marks it "from home, read-only", and it cannot be edited there. No other note is in the file, including in its history. This notebook keeps a record of the fork, so the file can come back later with Import from a copy..., below. Command line: burl-backend fork.

Forks held for a phone

A serve started with --forks=true makes a fork when a phone asks for one, and this notebook keeps it until the phone's next sync retires it. A phone that lost its copy leaves one behind. Menu F10 > Held forks... lists them, newest first, with the note, when it was served, whether it came back, and how much space forgetting it would free. Forget asks first and cannot be undone; a phone that still holds the copy can still send its changes home and pull a new fork. Command line: burl-backend forks and burl-backend forget.

The phone app

The Android app reads a notebook that a computer serves, with the notebook's own copy on the phone. Install it from the release page (the release notes say how), and serve the notebook from burl's Serve panel or from the router above.

Upgrade home before the phone: a home on the older notebook format refuses a copy from a phone that has the newer one. A Sync that is running keeps going when the screen rotates.

Bring changes back

Menu F10 > Import from a copy... and choose a copy of this notebook (one made with Save as..., one pulled from a host, or a plain file copy). A preview shows what would change. Nothing merges until you click Apply. Changes that cannot be combined are queued; menu F10 > Resolve conflicts (N) lets you pick Keep mine, Take theirs, or edit the text. There is no "keep both" option. A merge keeps the Archive whole: a note that ends up inside it, under a folder either side archived, comes in read-only with that folder, and a note one side moved out of an archived folder stays editable where it was moved. Without the window, burl-backend merge applies the copy and burl-backend resolve takes mine or theirs for each queued conflict.

Attachments merge like text. A file added in one copy arrives in the other, and a file deleted in one copy is deleted in the second, unless that copy changed the file. The preview counts them, in a line such as "1 attachment, 51 B". When both copies attached different files under one name, your file stays and the conflict is queued with both sides: Keep mine drops the other file and Take theirs puts it in place.

When both copies of a board moved cards between its lanes, each copy's moves land. A card that both copies moved, to different lanes, stays in your lane for now and the conflict is queued: Resolve conflicts (N) names the card and its lanes, and Keep in a lane puts it at the end of that lane without changing anything else on the board. When one copy removed a table column that the other copy wrote in, the conflict panel asks before that column's text goes, row by row.

The preview also lists what the copy brings about who is linked. A line such as "1 link statement(s)" counts the copy's halves of a machine link, and a row link studio-mac: half arrived, yours not signed names each. A row revoked laptop-2: key ended by studio-mac is a machine whose key the copy ends, and revoked this machine: key ended by studio-mac is this machine's own key. Apply takes the whole copy, so Cancel is how to look before deciding. A half that arrives for a key already ended is listed as kept laptop-2: its half ignored, key ended here and counts for nothing. "N run record(s)" counts the scheduled-recipe runs the copy carries. See Link your machines, and end one's key and Run a recipe on a schedule.

Step by step: Reintegrate a copy.

A copy is matched to your notebook by stable ids, and the merge needs a shared earlier state; see stable ids and history.

Questions this page answers