Skip to content

Commit f25b3ca

Browse files
authored
chore: cleanup documentation (#674)
1 parent 3b41d9f commit f25b3ca

File tree

6 files changed

+418
-393
lines changed

6 files changed

+418
-393
lines changed

README.md

+106-122
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,35 @@
1212

1313
Backrest is a web-accessible backup solution built on top of [restic](https://restic.net/). Backrest provides a WebUI which wraps the restic CLI and makes it easy to create repos, browse snapshots, and restore files. Additionally, Backrest can run in the background and take an opinionated approach to scheduling snapshots and orchestrating repo health operations.
1414

15-
By building on restic, Backrest leverages restic's mature feature set. Restic provides fast, reliable, and secure backup operations.
15+
By building on restic, Backrest leverages its mature, fast, reliable, and secure backup capabilities while adding an intuitive interface.
1616

17-
Backrest itself is built in Golang (matching restic's implementation) and is shipped as a self-contained and light weight binary with no dependencies other than restic. This project aims to be the easiest way to setup and get started with backups on any system. You can expect to be able to perform all operations from the web interface but should you ever need more control, you are free to browse your repo and perform operations using the [restic cli](https://restic.readthedocs.io/en/latest/manual_rest.html). Additionally, Backrest can safely detect and import your existing snapshots (or externally created snapshots on an ongoing basis).
17+
Built with Go, Backrest is distributed as a standalone, lightweight binary with restic as its sole dependency. It can securely create new repositories or manage existing ones. Once storage is configured, the WebUI handles most operations, while still allowing direct access to the powerful [restic CLI](https://restic.readthedocs.io/en/latest/manual_rest.html) for advanced operations when needed.
1818

19-
**Preview**
19+
## Preview
2020

2121
<p align="center">
2222
<img src="https://f000.backblazeb2.com/file/gshare/screenshots/2024/Screenshot+from+2024-01-04+18-19-50.png" width="60%" />
2323
<img src="https://f000.backblazeb2.com/file/gshare/screenshots/2024/Screenshot+from+2024-01-04+18-30-14.png" width="60%" />
2424
</p>
2525

26-
**Platform Support**
26+
## Key Features
2727

28-
- [Docker](https://hub.docker.com/r/garethgeorge/backrest)
28+
- **Web Interface**: Access locally or remotely (perfect for NAS deployments)
29+
- **Multi-Platform Support**:
2930
- Linux
3031
- macOS
3132
- Windows
3233
- FreeBSD
33-
34-
**Features**
35-
36-
- WebUI supports local and remote access (e.g. run on a NAS and access from your desktop)
37-
- Multi-platform support (Linux, macOS, Windows, FreeBSD, [Docker](https://hub.docker.com/r/garethgeorge/backrest))
38-
- Import your existing restic repositories
39-
- Cron scheduled backups and health operations (e.g. prune, check, forget)
40-
- UI for browsing and restoring files from snapshots
41-
- Configurable backup notifications (e.g. Discord, Slack, Shoutrrr, Gotify, Healthchecks)
42-
- Add shell command hooks to run before and after backup operations.
34+
- [Docker](https://hub.docker.com/r/garethgeorge/backrest)
35+
- **Backup Management**:
36+
- Import existing restic repositories
37+
- Cron-scheduled backups and maintenance (e.g. prune, check, forget, etc)
38+
- Browse and restore files from snapshots
39+
- Configurable notifications (Discord, Slack, Shoutrrr, Gotify, Healthchecks)
40+
- Pre/post backup command hooks to execute shell scripts
41+
- **Storage Options**:
4342
- Compatible with rclone remotes
44-
- Backup to any restic supported storage (e.g. S3, B2, Azure, GCS, local, SFTP, and all [rclone remotes](https://rclone.org/))
43+
- Supports all restic storage backends (S3, B2, Azure, GCS, local, SFTP, and [all rclone remotes](https://rclone.org/))
4544

4645
---
4746

@@ -53,25 +52,30 @@ Backrest itself is built in Golang (matching restic's implementation) and is shi
5352

5453
Backrest is packaged as a single executable. It can be run directly on Linux, macOS, and Windows. [restic](https://github.com/restic/restic) will be downloaded and installed on first run.
5554

56-
Download options
55+
### Quick Start Options
5756

58-
- Download and run a release from the [releases page](https://github.com/garethgeorge/backrest/releases).
59-
- Build from source ([see below](#building)).
60-
- Run with docker: `garethgeorge/backrest:latest` ([see on dockerhub](https://hub.docker.com/r/garethgeorge/backrest)) for an image that includes rclone and common unix utilities or `garethgeorge/backrest:scratch` for a minimal image.
57+
1. **Pre-built Release**: Download from the [releases page](https://github.com/garethgeorge/backrest/releases)
58+
2. **Docker**: Use `garethgeorge/backrest:latest` ([Docker Hub](https://hub.docker.com/r/garethgeorge/backrest))
59+
- Includes rclone and common Unix utilities
60+
- For minimal image, use `garethgeorge/backrest:scratch`
61+
3. **Build from Source**: See [Building](#building) section below
6162

62-
Backrest is accessible from a web browser. By default it binds to `127.0.0.1:9898` and can be accessed at `http://localhost:9898`. Change the port with the `BACKREST_PORT` environment variable e.g. `BACKREST_PORT=0.0.0.0:9898 backrest` to listen on all network interfaces. On first startup backrest will prompt you to create a default username and password, this can be changed later in the settings page.
63+
Once installed, access Backrest at `http://localhost:9898` (default port). First-time setup will prompt for username and password creation.
64+
65+
> [!NOTE]
66+
> To change the default port, set the `BACKREST_PORT` environment variable (e.g., `BACKREST_PORT=0.0.0.0:9898` to listen on all interfaces)
67+
>
68+
> Backrest will use your system's installed version of restic if it's available and compatible. If not, Backrest will download and install a suitable version in its data directory, keeping it updated. To use a specific restic binary, set the `BACKREST_RESTIC_COMMAND` environment variable to the desired path.
6369
64-
> [!Note]
65-
> Backrest will use your system install of restic if it is available and matches Backrest's required version. Otherwise it will download and install a compatible version of restic in its data directory. Backrest will keep restic up to date with the latest version. You force use of a specific restic binary (or non-standard version) by setting the `BACKREST_RESTIC_COMMAND` environment variable to the path of your restic binary.
6670

67-
## Running with Docker Compose
71+
### Running with Docker Compose
6872

6973
Docker image: https://hub.docker.com/r/garethgeorge/backrest
7074

7175
Example compose file:
7276

7377
```yaml
74-
version: "3.2"
78+
version: "3.8"
7579
services:
7680
backrest:
7781
image: garethgeorge/backrest:latest
@@ -81,90 +85,77 @@ services:
8185
- ./backrest/data:/data
8286
- ./backrest/config:/config
8387
- ./backrest/cache:/cache
84-
- /MY-BACKUP-DATA:/userdata # [optional] mount local paths to backup here.
85-
- /MY-REPOS:/repos # [optional] mount repos if using local storage, not necessary for remotes e.g. B2, S3, etc.
88+
- ./backrest/tmp:/tmp
89+
- /path/to/backup/data:/userdata # Mount local paths to backup
90+
- /path/to/local/repos:/repos # Mount local repos (optional for remote storage)
8691
environment:
87-
- BACKREST_DATA=/data # path for backrest data. restic binary and the database are placed here.
88-
- BACKREST_CONFIG=/config/config.json # path for the backrest config file.
89-
- XDG_CACHE_HOME=/cache # path for the restic cache which greatly improves performance.
90-
- TZ=America/Los_Angeles # set the timezone for the container, used as the timezone for cron jobs.
91-
restart: unless-stopped
92+
- BACKREST_DATA=/data
93+
- BACKREST_CONFIG=/config/config.json
94+
- XDG_CACHE_HOME=/cache
95+
- TMPDIR=/tmp
96+
- TZ=America/Los_Angeles
9297
ports:
93-
- 9898:9898
98+
- "9898:9898"
99+
restart: unless-stopped
94100
```
95101
96102
## Running on Linux
97103
98-
### All Linux Platforms
99-
100-
Download a release from the [releases page](https://github.com/garethgeorge/backrest/releases)
101-
102-
#### Using systemd with the install script (Recommended)
103-
104-
Extract the release you downloaded and run the install script:
105-
106-
```
107-
# Extract the release to a subfolder of the current directory
108-
mkdir backrest && tar -xzvf backrest_Linux_x86_64.tar.gz -C backrest
109-
# Run the install script
110-
cd backrest && ./install.sh
111-
```
112-
113-
The install script will:
114-
115-
- Move the Backrest binary to `/usr/local/bin`
116-
- Create a systemd service file at `/etc/systemd/system/backrest.service`
117-
- Enable and start the service
118-
119-
Read the script before running it to make sure you are comfortable with these operations.
120-
121-
#### Run on startup with cron (Basic)
122-
123-
Move the Backrest binary to `/usr/local/bin`:
124-
125-
```sh
126-
sudo mv backrest /usr/local/bin/backrest
127-
```
128-
129-
Add the following line to your crontab (e.g. `crontab -e`):
130-
131-
```sh
132-
@reboot /usr/local/bin/backrest
133-
```
134-
135-
#### Run on startup with systemd manually
136-
137-
```sh
138-
sudo mv backrest /usr/local/bin/backrest
139-
```
140-
141-
Create a systemd service file at `/etc/systemd/system/backrest.service` with the following contents:
142-
143-
```ini
144-
[Unit]
145-
Description=Backrest
146-
After=network.target
147-
148-
[Service]
149-
Type=simple
150-
User=<your linux user>
151-
Group=<your linux group>
152-
ExecStart=/usr/local/bin/backrest
153-
Environment="BACKREST_PORT=127.0.0.1:9898"
154-
155-
[Install]
156-
WantedBy=multi-user.target
157-
```
158-
159-
Then run the following commands to enable and start the service:
160-
161-
```sh
162-
sudo systemctl enable backrest
163-
sudo systemctl start backrest
164-
```
104+
### Running on Linux
105+
106+
1. **Download the Release**
107+
- Get the latest release from the [releases page](https://github.com/garethgeorge/backrest/releases)
108+
109+
2. **Installation Options**
110+
111+
a) Using the Install Script (Recommended)
112+
```sh
113+
mkdir backrest && tar -xzvf backrest_Linux_x86_64.tar.gz -C backrest
114+
cd backrest && sudo ./install.sh
115+
```
116+
This script will:
117+
- Move the Backrest binary to `/usr/local/bin`
118+
- Create and start a systemd service
119+
120+
b) Manual Installation with systemd
121+
```sh
122+
sudo mv backrest /usr/local/bin/backrest
123+
sudo tee /etc/systemd/system/backrest.service > /dev/null <<EOT
124+
[Unit]
125+
Description=Backrest
126+
After=network.target
127+
128+
[Service]
129+
Type=simple
130+
User=$(whoami)
131+
ExecStart=/usr/local/bin/backrest
132+
Environment="BACKREST_PORT=127.0.0.1:9898"
133+
134+
[Install]
135+
WantedBy=multi-user.target
136+
EOT
137+
sudo systemctl enable --now backrest
138+
```
139+
140+
c) Using cron (Basic)
141+
```sh
142+
sudo mv backrest /usr/local/bin/backrest
143+
(crontab -l 2>/dev/null; echo "@reboot /usr/local/bin/backrest") | crontab -
144+
```
145+
146+
3. **Verify Installation**
147+
- Access Backrest at `http://localhost:9898`
148+
- For the systemd service: `sudo systemctl status backrest`
165149
166150
> [!NOTE]
167-
> You can set the Linux user and group to your primary user (e.g. `whoami` when logged in).
151+
> Adjust the `User` in the systemd service file if needed. The install script and manual systemd instructions use your current user by default.
152+
>
153+
> By default backrest listens only on localhost, you can open optionally open it up to remote connections by setting the `BACKREST_PORT` environment variable. For systemd installations, run `sudo systemctl edit backrest` and add:
154+
> ```
155+
> [Service]
156+
> Environment="BACKREST_PORT=0.0.0.0:9898"
157+
> ```
158+
> Using `0.0.0.0` allows connections from any interface.
168159
169160
### Arch Linux
170161
@@ -181,54 +172,47 @@ sudo systemctl enable --now backrest@$USER.service
181172
182173
## Running on macOS
183174
184-
#### Using Homebrew
175+
### Using Homebrew (Recommended)
185176
186-
Backrest is provided as a [homebrew tap](https://github.com/garethgeorge/homebrew-backrest-tap). To install with brew run:
177+
Backrest is available via a [Homebrew tap](https://github.com/garethgeorge/homebrew-backrest-tap):
187178
188179
```sh
189180
brew tap garethgeorge/homebrew-backrest-tap
190181
brew install backrest
191182
brew services start backrest
192-
# optionally, install restic
193-
brew install restic
194183
```
195184
196-
This tap uses [Brew services](https://github.com/Homebrew/homebrew-services) to launch and manage Backrest's lifecycle. Backrest will launch on startup and run on port ':9898` by default.
185+
This method uses [Brew Services](https://github.com/Homebrew/homebrew-services) to manage Backrest. It will launch on startup and run on port 127.0.0.1:9898 by default.
197186
198187
> [!NOTE]
199-
> You may need to grant Full Disk Access to backrest. To do this, go to `System Preferences > Security & Privacy > Privacy > Full Disk Access` and add the path to backrest (typically /usr/local/bin/backrest).
188+
> You may need to grant Full Disk Access to Backrest. Go to `System Preferences > Security & Privacy > Privacy > Full Disk Access` and add `/usr/local/bin/backrest`.
200189
201-
#### Manually using the install script
190+
### Manual Installation
202191
203-
Download a Darwin release from the [releases page](https://github.com/garethgeorge/backrest/releases) and install it to `/usr/local/bin`.
192+
1. Download the latest Darwin release from the [releases page](https://github.com/garethgeorge/backrest/releases).
193+
2. Extract and install:
204194
205-
Extract the release you downloaded and run the install script:
206-
207-
```
208-
# extract the release to a subfolder of the current directory
195+
```sh
209196
mkdir backrest && tar -xzvf backrest_Darwin_arm64.tar.gz -C backrest
210-
# run the install script
211197
cd backrest && ./install.sh
212198
```
213199
214200
The install script will:
215-
216201
- Move the Backrest binary to `/usr/local/bin`
217-
- Create a launch agent file at `~/Library/LaunchAgents/com.backrest.plist`
202+
- Create a launch agent at `~/Library/LaunchAgents/com.backrest.plist`
218203
- Load the launch agent
219204
220-
Read the script before running it to make sure you are comfortable with these operations.
205+
> [!TIP]
206+
> Review the script before running to ensure you're comfortable with its operations.
221207
222208
## Running on Windows
223209
224210
#### Windows Installer
225211
226-
Download a the Windows installer for your architecture from the [releases page](https://github.com/garethgeorge/backrest/releases). The installer is named Backrest-setup-[arch].exe. Run the installer and follow the prompts.
227-
228-
The installer will place backrest and a GUI tray application to monitor backrest in `%localappdata%\Programs\Backrest\`. The GUI tray application will start on login by default.
212+
Download the Windows installer for your architecture from the [releases page](https://github.com/garethgeorge/backrest/releases). The installer, named Backrest-setup-[arch].exe, will place Backrest and a GUI tray application in `%localappdata%\Programs\Backrest\`. The tray application, set to start on login, monitors Backrest.
229213
230-
> [!NOTE] You can optionally override the default port Backrest uses by adding a user environment variable before running the installer. Open System Properties. There are multiple ways of getting there depending on Windows version. On Windows 10+ go to Settings - About - Advanced system settings (on the right side). At the bottom of the dialog window click Environment Variables. In the top section called "User variables for...", click New. Enter BACKREST_PORT as the variable name. Enter 127.0.0.1:port as the variable value. E.g. to run backrest on port 8080, enter 127.0.0.1:8080.
231-
If you make this change after Backrest is installed, just re-run the installer to update shortcuts with the new port.
214+
> [!TIP]
215+
> To override the default port before installation, set a user environment variable named BACKREST_PORT. On Windows 10+, navigate to Settings > About > Advanced system settings > Environment Variables. Under "User variables", create a new variable with the value "127.0.0.1:port" (e.g., "127.0.0.1:8080" for port 8080). If changing post-installation, re-run the installer to update shortcuts with the new port.
232216
233217
# Configuration
234218

0 commit comments

Comments
 (0)