-
Primeiro, preciso adicionar esta linha a
/etc/fstab
% sudo nano /etc/fstab UUID=e901452a-b3ea-48d2-acdb-6687fad0be50 /.snapshots btrfs subvol=@/.snapshots 0 0
e monte-o, não é necessário reinicializar.
% sudo mount /.snapshots
-
Obter instantâneo atual
No meu caso, anteriormente tenho um instantâneo número 75.
% sudo btrfs subvolume show / @/.snapshots/45/snapshot Name: snapshot UUID: 29d4436b-72d1-f14d-a9e9-f04b70c0ebe0 Parent UUID: efa9f21b-f3b7-3543-9649-3897e083b39d Received UUID: - Creation time: 2018-01-03 00:15:01 +0700 Subvolume ID: 355 Generation: 5677 Gen at creation: 3968 Parent ID: 301 Top level ID: 301 Flags: - Snapshot(s): @/.snapshots/50/snapshot @/.snapshots/51/snapshot
e
% sudo btrfs subvolume get-default / ID 355 gen 5682 top level 301 path @/.snapshots/45/snapshot
-
listar snapper % sudo snapper list
Type | # | Pre # | Date | User | Cleanup | Description | Userdata -------+----+-------+---------------------------------+------+----------+--------------+-------------- single | 0 | | | root | | current | single | 3 | | Mon 01 Jan 2018 02:45:03 PM WIB | root | timeline | timeline | single | 7 | | Mon 01 Jan 2018 04:30:01 PM WIB | root | timeline | timeline | single | 40 | | Tue 02 Jan 2018 10:15:01 PM WIB | root | timeline | timeline | single | 41 | | Tue 02 Jan 2018 10:52:35 PM WIB | root | | backup.epsi | pre | 42 | | Tue 02 Jan 2018 11:01:48 PM WIB | root | number | zypp(zypper) | important=yes post | 43 | 42 | Tue 02 Jan 2018 11:07:23 PM WIB | root | number | | important=yes single | 44 | | Tue 02 Jan 2018 11:15:01 PM WIB | root | timeline | timeline | single | 45 | | Wed 03 Jan 2018 12:15:01 AM WIB | root | timeline | timeline | pre | 46 | | Wed 03 Jan 2018 12:16:34 AM WIB | root | number | zypp(zypper) | important=no post | 47 | 46 | Wed 03 Jan 2018 12:19:38 AM WIB | root | number | | important=no pre | 48 | | Wed 03 Jan 2018 12:47:47 AM WIB | root | number | zypp(zypper) | important=no post | 49 | 48 | Wed 03 Jan 2018 12:48:10 AM WIB | root | number | | important=no ...
Eu decido voltar para 45.
-
ID de BTRFS
% sudo btrfs subvolume list -a / ID 257 gen 4804 top level 5 path <FS_TREE>/@ ID 258 gen 5096 top level 257 path <FS_TREE>/@/opt ID 259 gen 4157 top level 257 path <FS_TREE>/@/srv ID 260 gen 5672 top level 257 path <FS_TREE>/@/tmp ID 261 gen 5538 top level 257 path <FS_TREE>/@/usr/local ID 262 gen 5688 top level 257 path <FS_TREE>/@/var/cache ID 263 gen 4157 top level 257 path <FS_TREE>/@/var/crash ID 264 gen 4157 top level 257 path <FS_TREE>/@/var/lib/libvirt/images ID 265 gen 4157 top level 257 path <FS_TREE>/@/var/lib/machines ID 266 gen 4157 top level 257 path <FS_TREE>/@/var/lib/mailman ID 267 gen 4157 top level 257 path <FS_TREE>/@/var/lib/mariadb ID 268 gen 4157 top level 257 path <FS_TREE>/@/var/lib/mysql ID 269 gen 4157 top level 257 path <FS_TREE>/@/var/lib/named ID 270 gen 4157 top level 257 path <FS_TREE>/@/var/lib/pgsql ID 271 gen 5688 top level 257 path <FS_TREE>/@/var/log ID 272 gen 4157 top level 257 path <FS_TREE>/@/var/opt ID 273 gen 5688 top level 257 path <FS_TREE>/@/var/spool ID 274 gen 5672 top level 257 path <FS_TREE>/@/var/tmp ID 301 gen 5674 top level 257 path <FS_TREE>/@/.snapshots ID 304 gen 3008 top level 301 path <FS_TREE>/@/.snapshots/3/snapshot ID 311 gen 3160 top level 301 path <FS_TREE>/@/.snapshots/7/snapshot ID 345 gen 3737 top level 301 path <FS_TREE>/@/.snapshots/40/snapshot ID 350 gen 3849 top level 301 path <FS_TREE>/@/.snapshots/41/snapshot ID 351 gen 3862 top level 301 path <FS_TREE>/@/.snapshots/42/snapshot ID 353 gen 3874 top level 301 path <FS_TREE>/@/.snapshots/43/snapshot ID 354 gen 3887 top level 301 path <FS_TREE>/@/.snapshots/44/snapshot ID 355 gen 5688 top level 301 path <FS_TREE>/@/.snapshots/45/snapshot ID 356 gen 3972 top level 301 path <FS_TREE>/@/.snapshots/46/snapshot ID 357 gen 3980 top level 301 path <FS_TREE>/@/.snapshots/47/snapshot ID 358 gen 4021 top level 301 path <FS_TREE>/@/.snapshots/48/snapshot ID 359 gen 4022 top level 301 path <FS_TREE>/@/.snapshots/49/snapshot
Eu acho o ID de 45, é 355.
-
Alterar padrão
Para torná-lo gravável
% sudo btrfs property set -ts /.snapshots/45/snapshot ro false
E torná-lo padrão
% sudo btrfs subvolume set-default 355 /
Em seguida, reinicie
-
Remova o instantâneo de reversão irritante.
% sudo snapper delete 75 % sudo snapper delete 76 % sudo snapper delete 77 % sudo snapper list
Isso é tudo
Obrigado