Après une tentative d'upgrade d'une version 2024 LTS vers 2026 LTS, je réinstalle un Débian tout frais (non sans avoir dû re-créer la copie de l'ISO sur la clé USB après une première tentative d'installation qui a foiré). Installation de quelques paquets complémentaires via WiFi.
Ayant rebranché les deux disques externes, le BTRFS se monte tout seul et les backups semblent être bien là.
Installation via Synaptic de
- openssh-server
- rsnapshot
- yazi?
Connection ssh OK mais avec password vu qu'il faut réinstaller des clés.
Sous Debian apparemment le premier utilisateur n'est pas dans le groups sudo donc:
usermod -a -G sudo [moi-même]
Ensuite:
restaurer /home/luc
btrfs check
luc@luc330:~$ sudo umount /dev/sdc2
luc@luc330:~$ sudo btrfs check /dev/sdc2
Opening filesystem to check...
Checking filesystem on /dev/sdc2
UUID: f244899d-a9c4-4fec-a7f6-f0762b21b7eb
[1/8] checking log skipped (none written)
[2/8] checking root items
[3/8] checking extents
[4/8] checking free space tree
[5/8] checking fs roots
[6/8] checking only csums items (without verifying data)
[7/8] checking root refs
[8/8] checking quota groups skipped (not enabled on this FS)
found 7347332108288 bytes used, no error found
total csum bytes: 7165722212
total tree bytes: 9632563200
total fs tree bytes: 2122383360
total extent tree bytes: 179453952
btree space waste bytes: 626012997
file data blocks allocated: 7337699545088
referenced 7337699545088
luc@luc330:~$ sudo btrfs check /dev/sdc2
Opening filesystem to check...
Checking filesystem on /dev/sdc2
UUID: f244899d-a9c4-4fec-a7f6-f0762b21b7eb
[1/8] checking log skipped (none written)
[2/8] checking root items
[3/8] checking extents
[4/8] checking free space tree
[5/8] checking fs roots
[6/8] checking only csums items (without verifying data)
[7/8] checking root refs
[8/8] checking quota groups skipped (not enabled on this FS)
found 7347332108288 bytes used, no error found
total csum bytes: 7165722212
total tree bytes: 9632563200
total fs tree bytes: 2122383360
total extent tree bytes: 179453952
btree space waste bytes: 626012997
file data blocks allocated: 7337699545088
referenced 7337699545088
Clés ssh pour moi et pour root
luc@luc-E15302:~/Downloads$ ssh-copy-id luc@luc330
luc@luc-E15302:~/Downloads$ ssh luc@luc330
luc@luc-E15302:~/Downloads$ ssh luc@luc330
luc@luc330:~ su -
root@luc330:~/.ssh# cp /home/luc/.ssh/authorized_keys .
restaurer fstab et recréer mountpoint pour les backups, tester le mount
luc@luc330:~$ sudo mkdir /var/backups/rsync
luc@luc330:~$ sudo btrfs filesystem show
Label: none uuid: f244899d-a9c4-4fec-a7f6-f0762b21b7eb
Total devices 2 FS bytes used 6.68TiB
devid 1 size 5.37TiB used 4.12TiB path /dev/sdc2
devid 2 size 3.64TiB used 2.61TiB path /dev/sdb1
luc@luc330:~$ sudo mount /dev/sdc2 /var/backups/rsync
Label: none uuid: f244899d-a9c4-4fec-a7f6-f0762b21b7eb
Total devices 2 FS bytes used 6.68TiB
devid 1 size 5.37TiB used 4.12TiB path /dev/sdc2
devid 2 size 3.64TiB used 2.61TiB path /dev/sdb1
luc@luc330:~$ sudo mount /dev/sdc2 /var/backups/rsync
luc@luc330:~$ ls /var/backups/rsync
alpha.0 beta.0 beta.2 delta.0 delta.2 gamma.1
alpha.1 beta.1 beta.4 delta.1 gamma.0 usbmounted
alpha.0 beta.0 beta.2 delta.0 delta.2 gamma.1
alpha.1 beta.1 beta.4 delta.1 gamma.0 usbmounted
restaurer la config de rsnapshot
luc@luc330:/etc$ sudo cp /var/backups/rsync/alpha.0/localhost/etc/rsnapshot.conf /etc
luc@luc330:/etc$ ls -l /etc/rsnapshot.conf
-rw-r--r-- 1 root root 8582 14 nov 21:10 /etc/rsnapshot.conf
luc@luc330:/etc$ ls -l /etc/rsnapshot.conf
-rw-r--r-- 1 root root 8582 14 nov 21:10 /etc/rsnapshot.conf
sudo cp /var/backups/rsync/alpha.0/localhost/etc/cron.d/rsnapshot /etc/cron.d/
sudo cp -rv /var/backups/rsync/alpha.0/localhost/home/luc/.local/* /home/luc/.local/
sudo apt install ksh
test rsync = OK
test manuel de rsnapshot
Reste à faire:
- vérifier premiers runs sous cron