Proxmox Backup server
Backup Server configuration
Backup server is setup with:
- zfs storage
- access control - api tokens
- datastore
- sync jobs
- prune jobs
- verify jobs
- permissions
- timings and simulator
ZFS storage array
There are currently 2 x 8TB WD drives. Current pool status:
kevin@clio:~$ sudo zpool status pergamum
pool: pergamum
state: ONLINE
scan: scrub repaired 0B in 09:52:23 with 0 errors on Sun Mar 10 10:16:24 2024
config:
NAME STATE READ WRITE CKSUM
pergamum ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part1 ONLINE 0 0 0
sdc1 ONLINE 0 0 0
errors: No known data errorsCreating and expanding zfs pool
```
zpool create pergamum raidz /dev/disk/by-partuuid/9fab17e5-df2d-2448-b5d4-10193c673a6b /dev/disk/by-partuuid/f801ed37-1d6c-ee40-8b85-6bfc49aba0fb -f
zfs set mountpoint=/mnt/pergamum pergamum
(zpool import -c /etc/zfs/zpool.cache -aN)
zpool export pergamum
```
have not tried yet, but adding another set of disks for an additional top-level virtual device to our existing RAID-Z pool:
```
zpool add -n pergamum raidz DISK1 DISK2
```
> NOTE! `-n` is dry run, remove to commit.
Access Control
Each client host that wants to backup their contents to the backup server should have their unique API token for authentication.
API Token:
- user: root@pam
- token name: CLIENT_NAME
- expire: never
- enabled: true
Permissions - Add a API Token Permission:
- path: /datastore/proxmox-backup/CLIENT_NAME
- api token: root@pam!CLIENT_NAME
- role: DatastoreBackup
- propagate: true
Note! The path will not be define until after the Datastore namespace is define in the steps below
Proxmox datastore
If none exists create the datastore. Ours point is named `proxmox-backup` and points to ZFS storage mounted at `/mnt/pergamum`. All references to `proxmox-backup` referes to what you named it as in the create step here.
Namespace
Namespaces is what we will use in a datastore to separate permissions to each host. It's important to create these for the API tokens create in Access Control section above.
Prune & Garbage collect
We don't require backups for every day of the year. Pruning lets you systematically delete older backups, retaining backups for the last given number of time intervals. There exists a fantastic simulator that can be used to experiment with different backup schedules and prune options: https://pbs.proxmox.com/docs/prune-simulator/. The current configuration is:
- datastore: proxmox-backup
- namespace: root
- keep last: 4
- keep: hourly: -
- keep daily: 6
- keep weekly: 3
- keep monthly: 6
- keep yearly: 4
- max_depth: full
- prune schedule: 0/6:00
- enabled: true
Verify jobs
Current configuration is:
- local datastore: proxmox-backup
- namespace: root
- max-depth: full
- schedule: daily
- skip verified: true
- re-verify after: 30 days
Permissions
Permissions are explained in the Access Control section above, but it can be easier to configure permissions from the datastore. Navigate to the datastore Permission tab and add API Token Permission:
- path: /datastore/proxmox-backup/CLIENT_NAME
- API Token: root@pam!CLIENT_NAME
- Role: DatastoreBackup
- Propagate: true
Tailscale
Tailscale is used to create a network that uses wireguard to transparently between local and remote machines. To not require a third party a local instance of headscale is used as the tailscale login server.
Setting up a connection should only require `sudo tailscale up --login-server https://TAILSCALE_SUBDOMAIN.schleppe.cloud`.
To view the status: `sudo tailscale status`.
Client Configuration
Configure Backup on the Datacenter or PVE host level in the proxmox web GUI. If a backup storage is already added input the following preferences:
Selection mode: include selected VMs
Send email to: kevin.midboe+{PVE_HOSTNAME}@gmail.com
Email: On failure only
Mode: Snapshot
Enabled: True
Job Comment: {{guestname}}, {{node}}, {{vmid}}
Methodology
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Sub-paragraph
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Proxmox backup server
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Sub-paragraph
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Sub-paragraph
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.