From d62c4a40543e113e00f5716f665047e15b33d267 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Sat, 15 Feb 2025 21:28:32 +0000 Subject: [PATCH] docs: create Infrastructure/add-bacoid-user --- Infrastructure/add-bacoid-user.md | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Infrastructure/add-bacoid-user.md diff --git a/Infrastructure/add-bacoid-user.md b/Infrastructure/add-bacoid-user.md new file mode 100644 index 0000000..843262a --- /dev/null +++ b/Infrastructure/add-bacoid-user.md @@ -0,0 +1,33 @@ +--- +title: Add new bacoid user +description: +published: true +date: 2025-02-15T21:28:29.716Z +tags: +editor: markdown +dateCreated: 2025-02-15T21:28:29.716Z +--- + +# 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. + +## How to integrate server + +Syncoid sends incremental backups via ssh, thus we need to make sure we can ssh to the backup server. + +On the production server: +$ ssh-keygen +$ 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:machine=$machine_name rpool +$ zfs set syncoid:pool_a data/ovh data/pbs rpool +$ zfs set syncoid:pool_b data/ovh data/pbs rpool + +On the PBS server +$ useradd $user +$ mkdir /home/$user/.ssh +$ vim /home/$user.ssh/authorized_keys +$ chown -R $user /home/$user +$ zfs allow -u $guid clone,create,destroy,mount,receive,rollback,send,snapshot data/pbs/$user + +Then you can run bacoid \ No newline at end of file