server-desktop-01/docs/synology.md

133 lines
3.4 KiB
Markdown

# Synology DS218plus
Operational notes for accessing and navigating the Synology NAS without rediscovering paths.
## Connection
- SSH config alias: `synology`
- Hostname/IP: `192.168.86.31`
- SSH user: `jared`
- SSH key from `~/.ssh/config`: `~/.ssh/id_ed25519_git`
- Verified NAS hostname: `DS218plus`
Quick check:
```bash
ssh synology 'hostname; id'
```
Expected identity:
```text
DS218plus
uid=1026(jared) gid=100(users) groups=100(users),101(administrators),65536(family)
```
## Volume Paths
Synology shared folders are mounted under `/volume1` over SSH.
Important paths:
| Purpose | SSH path |
| --- | --- |
| Main backup share | `/volume1/backup` |
| Fedora continuous restic repo | `/volume1/backup/fedora_desktop_backup_continuous` |
| Older May 2024 user backup | `/volume1/backup/jared_backup052124` |
| Older May 2024 Fedora backup | `/volume1/backup/fedora_backup052124` |
| October 2024 Fedora recovery folder | `/volume1/backup/fedora_recovery_oct2024` |
List likely backup folders:
```bash
ssh synology 'find /volume1/backup -maxdepth 2 -mindepth 1 -type d | sort'
```
## Restic Access
Local `restic` is installed at `/usr/bin/restic`. Credentials are sourced from `~/.credentials`; do not print the file or password.
The active backup script uses:
```bash
source ~/.credentials
restic -r "sftp:${SYNOLOGY_HOST}:${SYNOLOGY_PATH}" snapshots --compact
```
As of 2026-05-14, `~/.credentials` has:
```text
SYNOLOGY_HOST=synology
SYNOLOGY_PATH=/home/Backups/fedora-workstation
```
Note: that SFTP path is a virtual path for restic/SFTP access. Over an interactive SSH shell, the same repository is visible at:
```text
/volume1/backup/fedora_desktop_backup_continuous
```
Repository structure confirmed on 2026-05-14:
```text
config
data/
index/
keys/
locks/
snapshots/
```
## Useful Restic Commands
List snapshots:
```bash
source ~/.credentials
restic -r "sftp:${SYNOLOGY_HOST}:${SYNOLOGY_PATH}" snapshots --compact
```
List a path in the latest snapshot:
```bash
source ~/.credentials
restic -r "sftp:${SYNOLOGY_HOST}:${SYNOLOGY_PATH}" ls latest /home/jared/.ssh
```
Search snapshots for specific files:
```bash
source ~/.credentials
restic -r "sftp:${SYNOLOGY_HOST}:${SYNOLOGY_PATH}" find /home/jared/.ssh/id_rsa /home/jared/.ssh/id_rsa.pub
```
Restore a specific file or directory to a temporary location:
```bash
source ~/.credentials
mkdir -p /tmp/restic-restore
restic -r "sftp:${SYNOLOGY_HOST}:${SYNOLOGY_PATH}" restore latest \
--target /tmp/restic-restore \
--include /home/jared/path/to/file
```
## Snapshot State on 2026-05-14
The Fedora continuous repo is accessible and decrypts successfully. It had 17 snapshots from 2026-04-11 through 2026-05-11.
Latest snapshot observed:
```text
c4ec0c91 2026-05-11 01:58:03 host=fedora tag=fedora size=18.779 GiB
```
## SSH Key Recovery Findings
Checked while investigating Hyperthrive VPS access on 2026-05-14:
- Latest restic snapshot `.ssh` contains only `config`, `id_ed25519_git`, `id_ed25519_git.pub`, `id_ed25519_ovh_backup`, `id_ed25519_ovh_backup.pub`, `known_hosts`, and `known_hosts.old`.
- `restic find` did not find `/home/jared/.ssh/id_rsa`, `/home/jared/.ssh/id_rsa.pub`, `id_ed25519_forgejo`, or `id_ed25519_forgejo.pub`.
- `/volume1/backup/jared_backup052124/.ssh` exists but is empty.
- `/volume1/backup/fedora_backup052124/jared/.ssh` exists but is empty.
- No `.ssh` files were found under `/volume1/backup/fedora_backup052124` or `/volume1/backup/fedora_recovery_oct2024` in the checked paths.