# 10. Backup, restore and sync

*Tabellum for desktop, chapter 10. On the web: https://tabellum.dudko.dev/manual/desktop/backup-restore-and-sync*

## 10.1 Backing up

Right-click a connection in the sidebar and choose **Back up…**.

![Backing up a database](https://tabellum.dudko.dev/manual/desktop/img/backup.jpg)

*Backing up a database*

The Mac App Store version backs up through the database connection itself: the schema and the rows are written as one SQL file (statements and `INSERT`s), as CSV or JSON Lines with one file per table, or as an Excel workbook with one sheet per table. **Tables** limits it to some tables. This is portable and works everywhere, but it is slower than the database’s own backup tools and no substitute for them on a very large database.

## 10.2 Restoring

**Restore…**, in the same menu, runs an SQL file statement by statement, or loads CSV or JSON Lines rows into a table, in one transaction where the database supports it.

![Restoring from a file](https://tabellum.dudko.dev/manual/desktop/img/restore.jpg)

*Restoring from a file*

## 10.3 Syncing the workspace with git

Sync keeps the workspace in your own git repository on GitHub, GitLab or Bitbucket, so another computer — or your phone — sees the same connections, queries and dashboards.

![Connecting the workspace to a repository](https://tabellum.dudko.dev/manual/desktop/img/sync.jpg)

*Connecting the workspace to a repository*

Marked on the screenshot: (1) Your repository; (2) GitHub, GitLab or Bitbucket; (3) An access token for that repository.

1. Choose **Sync** in the palette, or **Set up** at the bottom of the sidebar.
2. Enter the repository (1) and pick its host (2).
3. Paste an access token (3) that may read and write that repository.
4. Click **Connect & sync**.

Each sync commits your changes and brings in everyone else’s. When two people edit the same connection, dashboard or tunnel, Tabellum merges them field by field; a real conflict is shown side by side for you to choose.

> **Note:** Passwords, keys and tokens never go into the repository — only their names. On another device you type them once.
