aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorSam Scholten2025-10-27 13:40:25 +1000
committerSam Scholten2025-10-27 13:40:25 +1000
commit98f5396a9f04534856d95a297735709408b2f94e (patch)
tree088c3bb4472ba055d31b0825a7ec92086f632282 /README.md
parent56973528a9e4cab924951ad0e4c7b4eead4baa2c (diff)
parenta827a2c9b84474e023050b54aae192819fabb552 (diff)
downloaddrestic-98f5396a9f04534856d95a297735709408b2f94e.tar.gz
drestic-98f5396a9f04534856d95a297735709408b2f94e.zip
Merge remote-tracking branch 'origin/main'
Diffstat (limited to 'README.md')
-rw-r--r--README.md126
1 files changed, 35 insertions, 91 deletions
diff --git a/README.md b/README.md
index 887a5d9..ed6b363 100644
--- a/README.md
+++ b/README.md
@@ -2,129 +2,73 @@
<img src="logo.svg" width="120" markdown="1">
-Automated, encrypted, and deduplicated backups to MEGA cloud storage using restic.
+Automated encrypted backups to MEGA using restic.
## Setup
-1. Clone the repository:
```sh
git clone https://github.com/casparvitch/drestic
cd drestic
-```
-
-2. Install dependencies (supports apt, yum, pacman, zypper):
-```sh
make install-deps
+make setup-user # or setup-system for servers
```
-3. Run the setup script:
-```sh
-# For a personal machine (backs up /home/user)
-make setup-user
-# For a server (backs up /etc, /home, /root, etc.)
-# make setup-system
-```
- The script will prompt for your MEGA credentials and a new restic repository password. **Store the restic password safely.**
+Enter MEGA credentials and restic password when prompted. **Store the restic password safely.**
## Usage
-All common operations are handled via the `Makefile`. Run `make help` for a full list.
-
-**Check Status**
```sh
-# For user scope
-make status
-
-# For system scope
-make status-system
+make help # see all commands
+make status # check backup status
+make backup-now # run backup immediately
+make snapshots # list backups
```
-**Run a Backup Manually**
-```sh
-make backup-now
-# Monitor with: journalctl --user -fu restic-backup.service
-```
-
-**List Snapshots**
-```sh
-make snapshots
-```
-
-**Recover Files**
-The easiest method is to mount the repository.
-
-1. Create a mount point:
+**Recover files:**
```sh
mkdir ~/restore
-```
-
-2. Mount the backup:
- The repository path is now unique per host (e.g., `drestic_backups_my-server`). Find your exact path in `~/.config/restic/env`.
-```sh
-# For user scope (replace with your unique repo path)
-RESTIC_PASSWORD_FILE=~/.config/restic/password restic mount ~/restore --repo rclone:backup_remote:/drestic_backups_my-server
-```
-
-3. Browse `~/restore/snapshots/latest/` to find your files.
-
-4. Unmount when finished:
-```sh
+# Replace with your repo path from ~/.config/restic/env
+RESTIC_PASSWORD_FILE=~/.config/restic/password restic mount ~/restore --repo rclone:backup_remote:/drestic_backups_hostname
+# Browse ~/restore/snapshots/latest/
umount ~/restore
```
## Configuration
-Configuration files are created during setup.
+Edit backup paths: `~/.config/restic/paths` (user) or `/etc/restic/paths` (system)
+Edit excludes: `~/.config/restic/excludes`
+Add notifications: `make update-gotify`
-**Backup Paths & Exclusions**
-- **User scope:** `~/.config/restic/paths` and `~/.config/restic/excludes`
-- **System scope:** `/etc/restic/paths` and `/etc/restic/excludes`
+## Manual Checks
-Edit the `paths` file to change what is backed up. Edit the `excludes` file to add patterns to ignore. The default files contain a sensible starting point.
+**Automated:** Metadata-only weekly checks (catches 95% of issues)
-**Backup Schedule**
-The schedule is managed by systemd timers. To change the daily 3 AM backup time:
-
-1. Edit the timer file:
- - **User scope:** `~/.config/systemd/user/restic-backup.timer`
- - **System scope:** `/etc/systemd/system/restic-backup.timer`
+**Manual verification:**
+```sh
+# Quick metadata check (~50MB RAM, 1-2 min)
+source ~/.config/restic/env && restic check --repo "$RESTIC_REPOSITORY" --password-file "$RESTIC_PASSWORD_FILE"
-2. Change the `OnCalendar=` line.
+# Light data check (~200MB RAM, 5-15 min)
+source ~/.config/restic/env && restic check --repo "$RESTIC_REPOSITORY" --password-file "$RESTIC_PASSWORD_FILE" --read-data-subset 0.1%
-3. Reload systemd:
-```sh
-# For user scope
-systemctl --user daemon-reload && systemctl --user restart restic-backup.timer
-# For system scope
-sudo systemctl daemon-reload && sudo systemctl restart restic-backup.timer
+# Heavy data check (~500MB+ RAM, 30+ min)
+source ~/.config/restic/env && restic check --repo "$RESTIC_REPOSITORY" --password-file "$RESTIC_PASSWORD_FILE" --read-data-subset 1%
```
-**Notifications**
-To add or update Gotify push notifications, run:
+**From another machine:**
```sh
-make update-gotify
+# Setup: install restic, rclone
+rclone config create backup_remote mega user EMAIL pass PASSWORD
+echo "PASSWORD" > ~/.restic_password && chmod 600 ~/.restic_password
+restic check --repo rclone:backup_remote:/drestic_backups_HOSTNAME --password-file ~/.restic_password --read-data-subset 0.1%
```
-## Troubleshooting
-
-**Repository is locked?**
-```sh
-# Auto-detects scope and unlocks
-make unlock-repo
-```
+**When:** Monthly 0.1% checks, quarterly 1% checks, or troubleshooting.
-**Connection issues?**
-Verify rclone can connect to your MEGA account.
-```sh
-rclone ls backup_remote:
-```
+## Troubleshooting
-**Something else?**
-Check the logs.
```sh
-# For user scope
-make logs
-
-# For system scope
-make logs-system
-```
+make unlock-repo # fix locked repository
+make logs # check recent logs
+rclone ls backup_remote: # test MEGA connection
+``` \ No newline at end of file