# Buddy backup

Source: https://frameleaf.app/docs/cloud/buddy-backup/

Buddy backup gives you an off-site copy of your library on a friend's Frameleaf server, and you host theirs in return. Each server keeps an encrypted backup of the other. Your Frameleaf account handles pairing, but your photos go straight between the two servers, and neither your buddy nor Frameleaf Cloud can read them.

Hosting your buddy's backup never adds their photos, albums or people to your library, timeline or search. It's purely storage. Likewise, your restore screen only ever opens your own backup.

Use buddy backup and [cloud backup](https://frameleaf.app/docs/cloud/cloud-backup/) together for two off-site copies. Buddy backup encrypts everything on your server before anything is sent.

:::note[Enable Buddy backup]
An administrator enables Buddy backup with `FRAMELEAF_BUDDY_BACKUP=true` and the linked account's Buddy controls. Setting it back to `false` stops new backups but keeps recovery available.
:::

## How does Buddy Backup work?

Your server encrypts its backup, then sends it to your buddy's server. Your buddy stores the encrypted files but can't open them: only your own recovery kit unlocks your backup. The two directions have their own storage allowances, keys and restore points.

## What you need

Both servers need a Server licence to start a new Buddy Backup pairing. A Frameleaf Cloud plan is needed only when the servers can't connect directly and use the relay.

- Both servers running a compatible Frameleaf version and linked to a Frameleaf account. An account is free.
- A Server licence on each server to create a new pairing. An Individual licence doesn't create pairings. Pairings you already have keep backing up and restoring if a licence is later deactivated or refunded, subject to their normal pairing and security controls.
- A way for the two servers to reach each other. Either:
  - **A direct connection**: your server's Frameleaf direct address, which comes with the Server licence, or your own HTTPS **Public server URL**, set in the server's settings. Buddy backup then needs no Frameleaf Cloud plan, only the licences, or
  - **A connection through Frameleaf**, which links the two servers for you wherever they are, with no network setup. You need a [Frameleaf Cloud plan](https://frameleaf.app/docs/cloud/overview/#what-a-cloud-plan-includes) only for this, and transfers through Frameleaf count toward your normal [monthly allowance](https://frameleaf.app/docs/cloud/remote-access/#limits).
- A dedicated folder on each server for the other's backup, outside your photo libraries, import folders and the server's identity folder. Storage on your buddy's disk costs nothing extra.

Once you're paired, the encrypted connection check confirms the route between the two servers, so you know scheduled backups will get through.

## Set it up

Open **Settings**, then **Backup**, then **Buddy Backup**. The **Frameleaf Cloud**, then **Cloud backup** entry opens the same backup area.

1. Check the library mounts, configuration coverage and estimated size of the first backup.
2. Choose the folder where you'll store your buddy's backup and set a hard limit on the space you offer. You can offer a different amount from your buddy.
3. Invite your buddy's Frameleaf account. Your buddy accepts the invitation, then waits while you, on the inviting server, confirm their account, server and storage agreement. Only the inviting server confirms a pairing.
4. Download your **recovery kit**, then import it again to check it works. Keep it somewhere other than your server. Each server has its own encryption key, and you need the kit to restore if your server is lost.
5. Run the encrypted connection check, then start the first backup.

Optionally, you can keep an escrow copy of your recovery kit with Frameleaf Cloud. It's encrypted on your server with a passphrase, and Frameleaf Cloud never receives the passphrase.

## What's protected

Every user's originals, videos, Live Photo parts, sidecars, edits, project files and metadata, plus external libraries whose drives are connected when the backup runs. Each restore point also includes a verified database dump, Frameleaf settings, user preferences and the configuration files you declared during setup. It's not a whole operating-system image.

A restore point is only published as complete when every required file is captured unchanged, so keep external drives connected and declared configuration files in place when a backup runs. Thumbnails and transcoded videos are optional. Your buddy's backup that you host, temporary transfer files and caches are never included in your own.

### Cloud backup keys

If you also use [Cloud backup](https://frameleaf.app/docs/cloud/cloud-backup/) with a key stored on your server, that key is included in your encrypted buddy backup and put back when you recover settings or the whole server. A Cloud backup key that's never saved on the server isn't included. Your server's identity and your buddy recovery kit are never included; a recovered server keeps its new identity.

Keep a separate copy of each recovery kit or key, for buddy backup and for Cloud backup.

Your buddy can see how much space you use and when transfers happen, never your file names, albums or photos.

After the first backup, only new and changed files are sent, and metadata-only changes don't upload originals again. Pausing keeps the progress already confirmed.

## Two directions

- **My backup** shows your latest complete restore point, and separately, your latest successful restore check.
- **Hosting for my buddy** shows the space used and reserved. It never shows their file names, albums or photos.

The Command Center's overview and analytics show both directions next to Cloud backup. Refresh them to see the latest status.

The backup area has **Overview**, **Schedule** and **Restore**, plus a page for each place your backup goes: **Cloud Backup**, **Buddy Backup** and **On this server**.

From the controls you can **Pause sending** or **Pause receiving**, **Resume sending** or **Resume receiving**, **Restart incomplete backup** (which reuses files already safely stored), and **Verify recovery**, which checks stored content and restores a sample into a temporary folder. Automatic checks rotate through your backup weekly.

## Defaults

| Setting | Default |
| --- | --- |
| Buddies | One reciprocal buddy per server |
| Schedule | Daily at 02:00, in the sending server's time zone |
| Speed | 20 Mbit/s each way, with two transfers at a time in each direction |
| Retention | At least 30 days of restore points, plus 12 monthly points and the latest complete one |
| Free-space guard | Stops receiving before free space drops below 10 GiB or 10% of the volume, whichever is larger |

Change the schedule, transfer windows and limits under **Hosting & transfer settings**. When either side runs out of agreed space or free disk, receiving pauses. Protected restore points are never deleted to make room.

:::caution
Someone with administrator access to your buddy's computer can still delete files from their disk. Keep other independent copies of anything important.
:::

## Restore

Unlock with your PIN and choose a dated restore point. Restore a photo or video, a selection or an album; administrators can also restore a whole library, the settings or the entire server. The wizard previews what will change and any conflicts before it starts. By default it fills in what's missing and keeps your current changes; choosing to replace keeps a rollback copy. Restoring part of a library doesn't bring back old sharing.

A full server recovery checks the files first, then puts the server into maintenance mode while it restores. Before you start, reconnect your original storage mounts and check the versions are compatible. Recovery signs everyone out of the restored server and drops jobs that were in progress. If recovery fails, the server stays in maintenance mode.

### Your buddy backup settings after a restore

A restore point also holds your buddy backup schedule, time zone, transfer windows, limits and pause switches. When you recover settings or a whole server:

- **Keep** leaves your current buddy backup settings as they are.
- **Replace** brings back the saved schedule and limits, but keeps the new server's hosting folder, storage offer, pairing and identity. A direction stays paused if either server's settings pause it.

Older restore points without these settings can still be recovered.

### If your server is gone

1. Set up a new Frameleaf server and sign in to Frameleaf Cloud.
2. On your Buddy account page, rebind the backup to the new server. This revokes the old server's identity.
3. Import your recovery kit, or unlock your escrow copy, on the new server.

### Recover without the original server

Keep your recovery kit and the exported encrypted backup together with the recovery instructions for your installed release. Test a recovery to an empty destination before you retire your only working server.

## Ending a pairing

Ending a pairing stops new backups and normally gives you 30 days to recover; a security block revokes access immediately. Unlinking from Cloud, a Cloud outage or a lapsed subscription never silently deletes the backup on your buddy's disk. If a Cloud plan ends, pairings you already have keep backing up over a direct connection. With your recovery kit and an independent export, you can recover even without the original server.
