docs: update Infrastructure/add-bacoid-user

This commit is contained in:
Antoine Martin 2025-02-15 21:31:25 +00:00 committed by Wiki Admin
parent d62c4a4054
commit 16108cb48c

View file

@ -2,32 +2,32 @@
title: Add new bacoid user title: Add new bacoid user
description: description:
published: true published: true
date: 2025-02-15T21:28:29.716Z date: 2025-02-15T21:31:22.743Z
tags: tags:
editor: markdown editor: markdown
dateCreated: 2025-02-15T21:28:29.716Z dateCreated: 2025-02-15T21:28:29.716Z
--- ---
# Backup infrastructure # Backup infrastructure
Our backup infrastructure leverages zfs send/receive functionnality via syncoid from the sanoid package. We use a custom script called bacoid, which gets its config files via zfs config. Backups are sent to two PBS serves that are in an lxc container. Our backup infrastructure leverages zfs send/receive functionnality via syncoid from the sanoid package. We use a custom script called bacoid, which gets its config files via zfs config. Backups are sent to two PBS servers that are in lxc containers.
## How to integrate server ## How to integrate server
Syncoid sends incremental backups via ssh, thus we need to make sure we can ssh to the backup server. Syncoid sends incremental backups via ssh, thus we need to make sure we can ssh to the backup server.
On the production server: On the production server:
$ ssh-keygen > $ ssh-keygen
$ zfs set syncoid:target_a=$user@pbs-koma.ayakael.net:55200 rpool > $ zfs set syncoid:target_a=\$user@pbs-koma.ayakael.net:55200 rpool
$ zfs set syncoid:target_b=$user@pbs-veita.ayakael.net:55200 rpool > $ zfs set syncoid:target_b=\$user@pbs-veita.ayakael.net:55200 rpool
$ zfs set syncoid:machine=$machine_name rpool > $ zfs set syncoid:machine=\$machine_name rpool
$ zfs set syncoid:pool_a data/ovh data/pbs rpool > $ zfs set syncoid:pool_a=data/pbs rpool
$ zfs set syncoid:pool_b data/ovh data/pbs rpool > $ zfs set syncoid:pool_b=data/pbs rpool
On the PBS server On the PBS server
$ useradd $user > $ useradd \$user
$ mkdir /home/$user/.ssh > $ mkdir /home/\$user/.ssh
$ vim /home/$user.ssh/authorized_keys > $ vim /home/\$user.ssh/authorized_keys
$ chown -R $user /home/$user > $ chown -R \$user /home/$user
$ zfs allow -u $guid clone,create,destroy,mount,receive,rollback,send,snapshot data/pbs/$user > $ zfs allow -u \$guid clone,create,destroy,mount,receive,rollback,send,snapshot data/pbs/\$user
Then you can run bacoid Then you can run `bacoid`