[{"data":1,"prerenderedAt":1188},["ShallowReactive",2],{"navigation_docs_en":3,"-en-serveex-advanced-btrfs-snapshots-":385,"-en-serveex-advanced-btrfs-snapshots--surround":1183},[4,16,94,270,279,340],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":15},"About","i-noto-star","\u002Fen\u002Fabout","en\u002F1.about",[10],{"title":11,"path":12,"stem":13,"icon":14},"Welcome","\u002Fen\u002Fabout\u002Fwelcome","en\u002F1.about\u002F1.welcome","i-lucide-home",false,{"title":17,"icon":18,"path":19,"stem":20,"children":21,"page":15},"General","i-noto-open-book","\u002Fen\u002Fgeneral","en\u002F2.general",[22,26,44,58,76],{"title":17,"path":23,"stem":24,"icon":25},"\u002Fen\u002Fgeneral\u002Fsummary","en\u002F2.general\u002F1.summary","i-lucide-bookmark",{"title":27,"icon":28,"path":29,"stem":30,"children":31,"page":15},"Networking","i-lucide-network","\u002Fen\u002Fgeneral\u002Fnetworking","en\u002F2.general\u002F2.networking",[32,36,40],{"title":33,"path":34,"stem":35},"NAT & DHCP","\u002Fen\u002Fgeneral\u002Fnetworking\u002Fnat","en\u002F2.general\u002F2.networking\u002F1.nat",{"title":37,"path":38,"stem":39},"DNS Zone","\u002Fen\u002Fgeneral\u002Fnetworking\u002Fdns","en\u002F2.general\u002F2.networking\u002F2.dns",{"title":41,"path":42,"stem":43},"Samba","\u002Fen\u002Fgeneral\u002Fnetworking\u002Fsamba","en\u002F2.general\u002F2.networking\u002F3.samba",{"title":45,"icon":46,"path":47,"stem":48,"children":49,"page":15},"Storage","i-lucide-hard-drive","\u002Fen\u002Fgeneral\u002Fstorage","en\u002F2.general\u002F3.storage",[50,54],{"title":51,"path":52,"stem":53},"RAID","\u002Fen\u002Fgeneral\u002Fstorage\u002Fraid","en\u002F2.general\u002F3.storage\u002F1.raid",{"title":55,"path":56,"stem":57},"ZFS","\u002Fen\u002Fgeneral\u002Fstorage\u002Fzfs","en\u002F2.general\u002F3.storage\u002F2.zfs",{"title":59,"icon":60,"path":61,"stem":62,"children":63,"page":15},"Hardware","i-lucide-server","\u002Fen\u002Fgeneral\u002Fhardware","en\u002F2.general\u002F4.hardware",[64,68,72],{"title":65,"path":66,"stem":67},"The Basics","\u002Fen\u002Fgeneral\u002Fhardware\u002Fbasics","en\u002F2.general\u002F4.hardware\u002F1.basics",{"title":69,"path":70,"stem":71},"Network","\u002Fen\u002Fgeneral\u002Fhardware\u002Fnetwork","en\u002F2.general\u002F4.hardware\u002F2.network",{"title":73,"path":74,"stem":75},"The ProloNAS","\u002Fen\u002Fgeneral\u002Fhardware\u002Fprolonas","en\u002F2.general\u002F4.hardware\u002F3.prolonas",{"title":77,"icon":78,"path":79,"stem":80,"children":81,"page":15},"Linux tips for dummies","i-lucide-terminal","\u002Fen\u002Fgeneral\u002Flinux","en\u002F2.general\u002F5.linux",[82,86,90],{"title":83,"path":84,"stem":85},"Command line basics","\u002Fen\u002Fgeneral\u002Flinux\u002Fcli-basics","en\u002F2.general\u002F5.linux\u002F1.cli-basics",{"title":87,"path":88,"stem":89},"Folders and partitions","\u002Fen\u002Fgeneral\u002Flinux\u002Ffilesystem","en\u002F2.general\u002F5.linux\u002F2.filesystem",{"title":91,"path":92,"stem":93},"Handy CLI tools","\u002Fen\u002Fgeneral\u002Flinux\u002Fhandy-tools","en\u002F2.general\u002F5.linux\u002F3.handy-tools",{"title":95,"icon":96,"path":97,"stem":98,"children":99,"page":15},"Serveex","i-noto-microscope","\u002Fen\u002Fserveex","en\u002F3.serveex",[100,104,126,144,170,188,202,216,234,248],{"title":101,"path":102,"stem":103,"icon":25},"Introduction","\u002Fen\u002Fserveex\u002Fintroduction","en\u002F3.serveex\u002F1.introduction",{"title":105,"icon":106,"path":107,"stem":108,"children":109,"page":15},"Server core","i-lucide-server-cog","\u002Fen\u002Fserveex\u002Fcore","en\u002F3.serveex\u002F2.core",[110,114,118,122],{"title":111,"path":112,"stem":113},"Debian 13","\u002Fen\u002Fserveex\u002Fcore\u002Finstallation","en\u002F3.serveex\u002F2.core\u002F1.installation",{"title":115,"path":116,"stem":117},"Docker","\u002Fen\u002Fserveex\u002Fcore\u002Fdocker","en\u002F3.serveex\u002F2.core\u002F2.docker",{"title":119,"path":120,"stem":121},"WireGuard","\u002Fen\u002Fserveex\u002Fcore\u002Fwireguard","en\u002F3.serveex\u002F2.core\u002F3.wireguard",{"title":123,"path":124,"stem":125},"SWAG","\u002Fen\u002Fserveex\u002Fcore\u002Fswag","en\u002F3.serveex\u002F2.core\u002F4.swag",{"title":127,"icon":128,"path":129,"stem":130,"children":131,"page":15},"Security","i-lucide-shield","\u002Fen\u002Fserveex\u002Fsecurity","en\u002F3.serveex\u002F3.security",[132,136,140],{"title":133,"path":134,"stem":135},"Cloudflare Zero Trust","\u002Fen\u002Fserveex\u002Fsecurity\u002Fcloudflare","en\u002F3.serveex\u002F3.security\u002F2.cloudflare",{"title":137,"path":138,"stem":139},"TinyAuth","\u002Fen\u002Fserveex\u002Fsecurity\u002Ftinyauth","en\u002F3.serveex\u002F3.security\u002F3.tinyauth",{"title":141,"path":142,"stem":143},"Pocket ID","\u002Fen\u002Fserveex\u002Fsecurity\u002Fpocket-id","en\u002F3.serveex\u002F3.security\u002F4.pocket-id",{"title":145,"icon":146,"path":147,"stem":148,"children":149,"page":15},"Monitoring","i-lucide-chart-no-axes-column","\u002Fen\u002Fserveex\u002Fmonitoring","en\u002F3.serveex\u002F4.monitoring",[150,154,158,162,166],{"title":151,"path":152,"stem":153},"Uptime-Kuma","\u002Fen\u002Fserveex\u002Fmonitoring\u002Fuptime-kuma","en\u002F3.serveex\u002F4.monitoring\u002F1.uptime-kuma",{"title":155,"path":156,"stem":157},"Dozzle","\u002Fen\u002Fserveex\u002Fmonitoring\u002Fdozzle","en\u002F3.serveex\u002F4.monitoring\u002F2.dozzle",{"title":159,"path":160,"stem":161},"Speedtest Tracker","\u002Fen\u002Fserveex\u002Fmonitoring\u002Fspeedtest-tracker","en\u002F3.serveex\u002F4.monitoring\u002F3.speedtest-tracker",{"title":163,"path":164,"stem":165},"Beszel","\u002Fen\u002Fserveex\u002Fmonitoring\u002Fbeszel","en\u002F3.serveex\u002F4.monitoring\u002F4.beszel",{"title":167,"path":168,"stem":169},"UpSnap","\u002Fen\u002Fserveex\u002Fmonitoring\u002Fupsnap","en\u002F3.serveex\u002F4.monitoring\u002F5.upsnap",{"title":171,"icon":172,"path":173,"stem":174,"children":175,"page":15},"Media & Seedbox","i-lucide-list-video","\u002Fen\u002Fserveex\u002Fmedia","en\u002F3.serveex\u002F5.media",[176,180,184],{"title":177,"path":178,"stem":179},"Jellyfin","\u002Fen\u002Fserveex\u002Fmedia\u002Fjellyfin","en\u002F3.serveex\u002F5.media\u002F1.jellyfin",{"title":181,"path":182,"stem":183},"qBittorrent","\u002Fen\u002Fserveex\u002Fmedia\u002Fqbittorrent","en\u002F3.serveex\u002F5.media\u002F2.qbittorrent",{"title":185,"path":186,"stem":187},"Automation","\u002Fen\u002Fserveex\u002Fmedia\u002Fservarr","en\u002F3.serveex\u002F5.media\u002F3.servarr",{"title":189,"icon":190,"path":191,"stem":192,"children":193,"page":15},"Cloud Drive & Photos","i-lucide-cloud-upload","\u002Fen\u002Fserveex\u002Fcloud","en\u002F3.serveex\u002F6.cloud",[194,198],{"title":195,"path":196,"stem":197},"Immich","\u002Fen\u002Fserveex\u002Fcloud\u002Fimmich","en\u002F3.serveex\u002F6.cloud\u002F1.immich",{"title":199,"path":200,"stem":201},"Nextcloud","\u002Fen\u002Fserveex\u002Fcloud\u002Fnextcloud","en\u002F3.serveex\u002F6.cloud\u002F2.nextcloud",{"title":203,"icon":204,"path":205,"stem":206,"children":207,"page":15},"File & share","i-lucide-folder-tree","\u002Fen\u002Fserveex\u002Ffiles","en\u002F3.serveex\u002F7.files",[208,212],{"title":209,"path":210,"stem":211},"File Browser Quantum","\u002Fen\u002Fserveex\u002Ffiles\u002Ffile-browser-quantum","en\u002F3.serveex\u002F7.files\u002F1.file-browser-quantum",{"title":213,"path":214,"stem":215},"Pingvin","\u002Fen\u002Fserveex\u002Ffiles\u002Fpingvin","en\u002F3.serveex\u002F7.files\u002F2.pingvin",{"title":217,"icon":218,"path":219,"stem":220,"children":221,"page":15},"Developpement","i-lucide-code-xml","\u002Fen\u002Fserveex\u002Fdevelopment","en\u002F3.serveex\u002F8.development",[222,226,230],{"title":223,"path":224,"stem":225},"Code-Server","\u002Fen\u002Fserveex\u002Fdevelopment\u002Fcode-server","en\u002F3.serveex\u002F8.development\u002F1.code-server",{"title":227,"path":228,"stem":229},"Forgejo","\u002Fen\u002Fserveex\u002Fdevelopment\u002Fforgejo","en\u002F3.serveex\u002F8.development\u002F2.forgejo",{"title":231,"path":232,"stem":233},"IT Tools","\u002Fen\u002Fserveex\u002Fdevelopment\u002Fit-tools","en\u002F3.serveex\u002F8.development\u002F3.it-tools",{"title":235,"icon":236,"path":237,"stem":238,"children":239,"page":15},"Useful Apps","i-lucide-award","\u002Fen\u002Fserveex\u002Fapps","en\u002F3.serveex\u002F9.apps",[240,244],{"title":241,"path":242,"stem":243},"AdGuard Home","\u002Fen\u002Fserveex\u002Fapps\u002Fadguard","en\u002F3.serveex\u002F9.apps\u002F1.adguard",{"title":245,"path":246,"stem":247},"Vaultwarden","\u002Fen\u002Fserveex\u002Fapps\u002Fvaultwarden","en\u002F3.serveex\u002F9.apps\u002F2.vaultwarden",{"title":249,"icon":250,"path":251,"stem":252,"children":253,"page":15},"Advanced","i-lucide-flask-conical","\u002Fen\u002Fserveex\u002Fadvanced","en\u002F3.serveex\u002F91.advanced",[254,258,262,266],{"title":255,"path":256,"stem":257},"Authentik","\u002Fen\u002Fserveex\u002Fadvanced\u002Fauthentik","en\u002F3.serveex\u002F91.advanced\u002F1.authentik",{"title":259,"path":260,"stem":261},"Arcane","\u002Fen\u002Fserveex\u002Fadvanced\u002Farcane","en\u002F3.serveex\u002F91.advanced\u002F2.arcane",{"title":263,"path":264,"stem":265},"Backrest","\u002Fen\u002Fserveex\u002Fadvanced\u002Fbackrest","en\u002F3.serveex\u002F91.advanced\u002F3.backrest",{"title":267,"path":268,"stem":269},"BTRFS Snapshots","\u002Fen\u002Fserveex\u002Fadvanced\u002Fbtrfs-snapshots","en\u002F3.serveex\u002F91.advanced\u002F4.btrfs-snapshots",{"title":271,"icon":272,"path":273,"stem":274,"children":275,"page":15},"Stockeex","i-noto-computer-disk","\u002Fen\u002Fstockeex","en\u002F4.stockeex",[276],{"title":271,"path":277,"stem":278,"icon":25},"\u002Fen\u002Fstockeex\u002Fintroduction","en\u002F4.stockeex\u002F1.introduction",{"title":280,"icon":281,"path":282,"stem":283,"children":284,"page":15},"My nonsense","i-noto-test-tube","\u002Fen\u002Fnonsense","en\u002F5.nonsense",[285,288,310],{"title":280,"path":286,"stem":287,"icon":25},"\u002Fen\u002Fnonsense\u002Fsummary","en\u002F5.nonsense\u002F1.summary",{"title":289,"icon":290,"path":291,"stem":292,"children":293,"page":15},"Python","i-lucide-file-code-2","\u002Fen\u002Fnonsense\u002Fpython","en\u002F5.nonsense\u002F2.python",[294,298,302,306],{"title":295,"path":296,"stem":297},"Nvidia Stock Bot","\u002Fen\u002Fnonsense\u002Fpython\u002Fnvidia-stock-bot","en\u002F5.nonsense\u002F2.python\u002F1.nvidia-stock-bot",{"title":299,"path":300,"stem":301},"AdGuard CIDRE","\u002Fen\u002Fnonsense\u002Fpython\u002Fadguard-cidre","en\u002F5.nonsense\u002F2.python\u002F2.adguard-cidre",{"title":303,"path":304,"stem":305},"Lumeex","\u002Fen\u002Fnonsense\u002Fpython\u002Flumeex","en\u002F5.nonsense\u002F2.python\u002F3.lumeex",{"title":307,"path":308,"stem":309},"Instameex","\u002Fen\u002Fnonsense\u002Fpython\u002Finstameex","en\u002F5.nonsense\u002F2.python\u002F4.instameex",{"title":311,"icon":312,"path":313,"stem":314,"children":315,"page":15},"Bash","i-lucide-file-terminal","\u002Fen\u002Fnonsense\u002Fbash","en\u002F5.nonsense\u002F3.bash",[316,320,324,328,332,336],{"title":317,"path":318,"stem":319},"Servarr corrector","\u002Fen\u002Fnonsense\u002Fbash\u002Fservarr-duplicates","en\u002F5.nonsense\u002F3.bash\u002F1.servarr-duplicates",{"title":321,"path":322,"stem":323},"LUKS Backup","\u002Fen\u002Fnonsense\u002Fbash\u002Fluks-backup","en\u002F5.nonsense\u002F3.bash\u002F2.luks-backup",{"title":325,"path":326,"stem":327},"Socat Proxy","\u002Fen\u002Fnonsense\u002Fbash\u002Fsocat-proxy","en\u002F5.nonsense\u002F3.bash\u002F3.socat-proxy",{"title":329,"path":330,"stem":331},"HotDisk","\u002Fen\u002Fnonsense\u002Fbash\u002Fhotdisk","en\u002F5.nonsense\u002F3.bash\u002F4.hotdisk",{"title":333,"path":334,"stem":335},"Backrest Docker Stop","\u002Fen\u002Fnonsense\u002Fbash\u002Fbackrest-docker-stop","en\u002F5.nonsense\u002F3.bash\u002F5.backrest-docker-stop",{"title":337,"path":338,"stem":339},"rm Confirmation Guard","\u002Fen\u002Fnonsense\u002Fbash\u002Frm-confirmation","en\u002F5.nonsense\u002F3.bash\u002F6.rm-confirmation",{"title":341,"icon":342,"path":343,"stem":344,"children":345,"page":15},"Recycled","i-noto-recycling-symbol","\u002Fen\u002Frecycled","en\u002F6.recycled",[346,349,363],{"title":341,"path":347,"stem":348,"icon":25},"\u002Fen\u002Frecycled\u002Fsummary","en\u002F6.recycled\u002F1.summary",{"title":350,"icon":351,"path":352,"stem":353,"children":354,"page":15},"Deprecated","i-lucide-trash-2","\u002Fen\u002Frecycled\u002Fdeprecated","en\u002F6.recycled\u002F2.deprecated",[355,359],{"title":356,"path":357,"stem":358},"WireGuard 14","\u002Fen\u002Frecycled\u002Fdeprecated\u002Fwireguard-14","en\u002F6.recycled\u002F2.deprecated\u002F1.wireguard-14",{"title":360,"path":361,"stem":362},"File Browser","\u002Fen\u002Frecycled\u002Fdeprecated\u002Ffile-browser","en\u002F6.recycled\u002F2.deprecated\u002F2.file-browser",{"title":364,"icon":365,"path":366,"stem":367,"children":368,"page":15},"Alternatives","i-lucide-arrow-left-right","\u002Fen\u002Frecycled\u002Falternatives","en\u002F6.recycled\u002F3.alternatives",[369,373,377,381],{"title":370,"path":371,"stem":372},"Plex","\u002Fen\u002Frecycled\u002Falternatives\u002Fplex","en\u002F6.recycled\u002F3.alternatives\u002F1.plex",{"title":374,"path":375,"stem":376},"qBittorrent for Plex","\u002Fen\u002Frecycled\u002Falternatives\u002Fqbittorrent-for-plex","en\u002F6.recycled\u002F3.alternatives\u002F2.qbittorrent-for-plex",{"title":378,"path":379,"stem":380},"Servarr for Plex","\u002Fen\u002Frecycled\u002Falternatives\u002Fservarr-for-plex","en\u002F6.recycled\u002F3.alternatives\u002F3.servarr-for-plex",{"title":382,"path":383,"stem":384},"Gitea","\u002Fen\u002Frecycled\u002Falternatives\u002Fgitea","en\u002F6.recycled\u002F3.alternatives\u002F4.gitea",{"id":386,"title":267,"body":387,"contributors":1175,"description":1176,"extension":1177,"hideCopyPage":15,"hideHeader":15,"hideToc":15,"links":1178,"meta":1179,"navigation":1180,"path":268,"seo":1181,"stem":269,"__hash__":1182},"docs_en\u002Fen\u002F3.serveex\u002F91.advanced\u002F4.btrfs-snapshots.md",{"type":388,"value":389,"toc":1161},"minimark",[390,398,423,431,436,443,446,462,465,474,478,494,562,570,574,591,641,665,672,698,701,725,743,816,837,841,844,869,872,886,928,932,939,952,959,976,979,995,998,1019,1029,1033,1036,1045,1126,1129,1147,1154,1157],[391,392],"ellipsis",{"blur":393,"left":394,"top":395,"width":396,"z-index":397},"140px","0px","10rem","40rem","60",[399,400,401,408,409,413,414,418,419,422],"p",{},[402,403,407],"a",{"href":404,"rel":405},"https:\u002F\u002Fbtrfs.readthedocs.io\u002F",[406],"nofollow","BTRFS"," is a Linux filesystem with one killer feature for a homelab: ",[410,411,412],"strong",{},"snapshots",". A snapshot freezes the exact state of a filesystem in an instant, at essentially zero cost, without copying a single byte of data upfront. Break something ten minutes after an ",[415,416,417],"code",{},"apt full-upgrade",", or overwrite the wrong ",[415,420,421],{},".env"," file, and you can go back to exactly how things were before, without touching a backup at all.",[399,424,425,426,430],{},"This is not what ",[402,427,429],{"href":428},"\u002Fserveex\u002Fadvanced\u002Fbackrest","Backrest and the 3-2-1 rule"," are for, so it's worth being precise about the difference before setting anything up.",[432,433,435],"h2",{"id":434},"snapshots-are-not-backups","Snapshots are not backups",[399,437,438,439,442],{},"A snapshot lives on the exact same disk as the data it protects. It's instant, needs no network, and it's perfect for undoing a mistake you just made, but it does nothing at all the day that disk itself dies, gets stolen, or your server burns down. That's what a real ",[402,440,441],{"href":428},"3-2-1 backup"," is for: a copy on different media, ideally off-site.",[399,444,445],{},"Think of it this way:",[447,448,449,456],"ul",{},[450,451,452,455],"li",{},[410,453,454],{},"Snapshot"," = an undo button. Instant, local, cheap, only useful while the disk is alive.",[450,457,458,461],{},[410,459,460],{},"Backup"," = insurance. Slower, off-site, the only thing that survives the disk itself failing.",[399,463,464],{},"Keep both. Snapshots make you fearless about updates and experiments, backups make sure a dead drive stays an inconvenience instead of a catastrophe.",[466,467,469,470,473],"note",{"to":468},"\u002Fserveex\u002Fcore\u002Finstallation#partitioning","This guide assumes the root partition was formatted with Btrfs during ",[402,471,472],{"href":468},"Debian's installation",". Btrfs can't be safely bolted onto an existing ext4 root after the fact, so this is a choice you make once, at install time.",[432,475,477],{"id":476},"formatting-the-root-partition-with-btrfs","Formatting the root partition with BTRFS",[399,479,480,481,485,486,489,490,493],{},"Debian's ",[482,483,484],"em",{},"Guided"," partitioning only ever offers ext4. To get Btrfs, pick ",[482,487,488],{},"Manual"," partitioning instead, at the same step ",[402,491,492],{"href":468},"the main install guide"," describes:",[495,496,498,503,513,517,527,531,545,549,558],"steps",{"level":497},"3",[499,500,502],"h3",{"id":501},"select-manual-partitioning","Select Manual partitioning",[399,504,505,506,508,509,512],{},"At the partitioning method screen, choose ",[482,507,488],{}," instead of ",[482,510,511],{},"Guided - use entire disk",".",[499,514,516],{"id":515},"create-a-partition-table","Create a partition table",[399,518,519,520,523,524,512],{},"Select the disk, confirm creating a new empty partition table, then select the resulting ",[482,521,522],{},"FREE SPACE"," and choose ",[482,525,526],{},"Create a new partition",[499,528,530],{"id":529},"set-the-partition-size-and-type","Set the partition size and type",[399,532,533,534,537,538,541,542,512],{},"Give the partition the rest of the disk (minus a small EFI partition if you're on UEFI, handled the same way as a Guided install), and set ",[482,535,536],{},"Use as"," to ",[410,539,540],{},"Btrfs journaling file system",", with the mount point ",[415,543,544],{},"\u002F",[499,546,548],{"id":547},"finish-partitioning","Finish partitioning",[399,550,551,554,555,512],{},[482,552,553],{},"Finish partitioning and write changes to disk",", then confirm with ",[482,556,557],{},"Yes",[499,559,561],{"id":560},"done","Done!",[399,563,564,565,569],{},"Everything else in the ",[402,566,568],{"href":567},"\u002Fserveex\u002Fcore\u002Finstallation#install-debian","installer"," stays the same.",[432,571,573],{"id":572},"installing-snapper","Installing Snapper",[399,575,576,577,580,581,586,587,590],{},"Rather than juggling raw ",[415,578,579],{},"btrfs subvolume"," commands by hand, ",[402,582,585],{"href":583,"rel":584},"https:\u002F\u002Fgithub.com\u002FopenSUSE\u002Fsnapper",[406],"Snapper"," is a small tool that manages the whole snapshot lifecycle: creating them, storing them tidily, pruning old ones, and automatically bracketing every ",[415,588,589],{},"apt"," operation with a snapshot pair.",[592,593,599],"pre",{"className":594,"code":595,"filename":596,"language":597,"meta":598,"style":598},"language-bash shiki shiki-themes github-dark material-theme github-dark","sudo apt install snapper\nsudo snapper -c root create-config \u002F\n","Terminal","bash","",[415,600,601,620],{"__ignoreMap":598},[602,603,606,610,614,617],"span",{"class":604,"line":605},"line",1,[602,607,609],{"class":608},"sEgDM","sudo",[602,611,613],{"class":612},"s11XM"," apt",[602,615,616],{"class":612}," install",[602,618,619],{"class":612}," snapper\n",[602,621,623,625,628,632,635,638],{"class":604,"line":622},2,[602,624,609],{"class":608},[602,626,627],{"class":612}," snapper",[602,629,631],{"class":630},"sJWha"," -c",[602,633,634],{"class":612}," root",[602,636,637],{"class":612}," create-config",[602,639,640],{"class":612}," \u002F\n",[399,642,643,646,647,650,651,653,654,657,658,544,661,664],{},[415,644,645],{},"create-config"," registers a config named ",[415,648,649],{},"root"," for the ",[415,652,544],{}," filesystem, and creates a dedicated ",[415,655,656],{},".snapshots"," subvolume under it to store every snapshot, locked down to root. No ",[415,659,660],{},"@",[415,662,663],{},"@home"," subvolume split needed, this works fine on the plain single-subvolume layout the manual partitioning above just created.",[399,666,667,668,671],{},"Turn the config on by editing ",[415,669,670],{},"\u002Fetc\u002Fdefault\u002Fsnapper",":",[592,673,677],{"className":674,"code":675,"filename":670,"language":676,"meta":598,"style":598},"language-properties shiki shiki-themes github-dark material-theme github-dark","SNAPPER_CONFIGS=\"root\"\n","properties",[415,678,679],{"__ignoreMap":598},[602,680,681,685,689,693,695],{"class":604,"line":605},[602,682,684],{"class":683},"szyEh","SNAPPER_CONFIGS",[602,686,688],{"class":687},"s8jd1","=",[602,690,692],{"class":691},"s8K8j","\"",[602,694,649],{"class":612},[602,696,697],{"class":691},"\"\n",[399,699,700],{},"Then enable the timers that run Snapper's periodic snapshots and cleanup:",[592,702,704],{"className":594,"code":703,"filename":596,"language":597,"meta":598,"style":598},"sudo systemctl enable --now snapper-timeline.timer snapper-cleanup.timer\n",[415,705,706],{"__ignoreMap":598},[602,707,708,710,713,716,719,722],{"class":604,"line":605},[602,709,609],{"class":608},[602,711,712],{"class":612}," systemctl",[602,714,715],{"class":612}," enable",[602,717,718],{"class":630}," --now",[602,720,721],{"class":612}," snapper-timeline.timer",[602,723,724],{"class":612}," snapper-cleanup.timer\n",[399,726,727,730,731,734,735,738,739,742],{},[415,728,729],{},"snapper-timeline.timer"," fires ",[410,732,733],{},"every hour"," by default, that's fixed by the unit itself, not by a config option. Each run takes one snapshot and files it under the appropriate bucket (hourly, daily, monthly, yearly); the ",[415,736,737],{},"TIMELINE_LIMIT_*"," settings covered further down only control how many of each bucket survive, not how often a snapshot is taken. ",[415,740,741],{},"snapper-cleanup.timer"," runs once a day (plus once 10 minutes after boot) to enforce those limits.",[744,745,746,749,766,799],"tip",{},[399,747,748],{},"✨ To take timeline snapshots at a different frequency, for example every 6 hours instead of every hour, override the timer instead of editing the package's unit file directly:",[592,750,752],{"className":594,"code":751,"filename":596,"language":597,"meta":598,"style":598},"sudo systemctl edit snapper-timeline.timer\n",[415,753,754],{"__ignoreMap":598},[602,755,756,758,760,763],{"class":604,"line":605},[602,757,609],{"class":608},[602,759,712],{"class":612},[602,761,762],{"class":612}," edit",[602,764,765],{"class":612}," snapper-timeline.timer\n",[592,767,772],{"className":768,"code":769,"filename":770,"language":771,"meta":598,"style":598},"language-ini shiki shiki-themes github-dark material-theme github-dark","[Timer]\nOnCalendar=\nOnCalendar=*-*-* 0\u002F6:00:00\n","override.conf","ini",[415,773,774,780,788],{"__ignoreMap":598},[602,775,776],{"class":604,"line":605},[602,777,779],{"class":778},"srnIM","[Timer]\n",[602,781,782,785],{"class":604,"line":622},[602,783,784],{"class":683},"OnCalendar",[602,786,787],{"class":687},"=\n",[602,789,791,793,795],{"class":604,"line":790},3,[602,792,784],{"class":683},[602,794,688],{"class":687},[602,796,798],{"class":797},"slcoZ","*-*-* 0\u002F6:00:00\n",[399,800,801,802,805,806,809,810,812,813,512],{},"The empty ",[415,803,804],{},"OnCalendar="," line clears the packaged ",[415,807,808],{},"hourly"," value first, since systemd otherwise adds new ",[415,811,784],{}," lines to the existing ones instead of replacing them. Apply it with ",[415,814,815],{},"sudo systemctl daemon-reload && sudo systemctl restart snapper-timeline.timer",[466,817,818,819,822,823,825,826,829,830,833,834,836],{},"Debian's package also ships an APT hook (",[415,820,821],{},"\u002Fetc\u002Fapt\u002Fapt.conf.d\u002F80snapper",") that kicks in the moment a config is listed in ",[415,824,684],{},": from now on, every ",[415,827,828],{},"apt install",", ",[415,831,832],{},"apt upgrade"," or ",[415,835,417],{}," automatically gets a snapshot right before and right after it runs, with zero extra effort on your part.",[432,838,840],{"id":839},"taking-a-snapshot","Taking a snapshot",[399,842,843],{},"For anything outside apt, like editing a systemd unit or a Docker Compose file, take one yourself with a description that will actually mean something later:",[592,845,847],{"className":594,"code":846,"filename":596,"language":597,"meta":598,"style":598},"sudo snapper create --description \"before compose change on swag\"\n",[415,848,849],{"__ignoreMap":598},[602,850,851,853,855,858,861,864,867],{"class":604,"line":605},[602,852,609],{"class":608},[602,854,627],{"class":612},[602,856,857],{"class":612}," create",[602,859,860],{"class":630}," --description",[602,862,863],{"class":691}," \"",[602,865,866],{"class":612},"before compose change on swag",[602,868,697],{"class":691},[399,870,871],{},"List every snapshot with:",[592,873,875],{"className":594,"code":874,"filename":596,"language":597,"meta":598,"style":598},"sudo snapper list\n",[415,876,877],{"__ignoreMap":598},[602,878,879,881,883],{"class":604,"line":605},[602,880,609],{"class":608},[602,882,627],{"class":612},[602,884,885],{"class":612}," list\n",[592,887,892],{"className":888,"code":889,"filename":890,"language":891,"meta":598,"style":598},"language-console shiki shiki-themes github-dark material-theme github-dark"," # | Type   | Pre # | Date                     | Description\n---+--------+-------+--------------------------+---------------------------------\n0  | single |       |                          | current\n1  | single |       | Tue 09 Sep 2026 18:30:00 | before compose change on swag\n2  | pre    |       | Tue 09 Sep 2026 19:00:01 | apt install unattended-upgrades\n3  | post   | 2     | Tue 09 Sep 2026 19:00:14 | apt install unattended-upgrades\n","Output","console",[415,893,894,900,905,910,916,922],{"__ignoreMap":598},[602,895,896],{"class":604,"line":605},[602,897,899],{"class":898},"s8-mJ"," # | Type   | Pre # | Date                     | Description\n",[602,901,902],{"class":604,"line":622},[602,903,904],{"class":898},"---+--------+-------+--------------------------+---------------------------------\n",[602,906,907],{"class":604,"line":790},[602,908,909],{"class":898},"0  | single |       |                          | current\n",[602,911,913],{"class":604,"line":912},4,[602,914,915],{"class":898},"1  | single |       | Tue 09 Sep 2026 18:30:00 | before compose change on swag\n",[602,917,919],{"class":604,"line":918},5,[602,920,921],{"class":898},"2  | pre    |       | Tue 09 Sep 2026 19:00:01 | apt install unattended-upgrades\n",[602,923,925],{"class":604,"line":924},6,[602,926,927],{"class":898},"3  | post   | 2     | Tue 09 Sep 2026 19:00:14 | apt install unattended-upgrades\n",[432,929,931],{"id":930},"restoring-files-from-a-snapshot","Restoring files from a snapshot",[399,933,934,935,938],{},"Snapper keeps the full state of the filesystem at snapshot time under ",[415,936,937],{},"\u002F.snapshots\u002F\u003Cnumber>\u002Fsnapshot",", browsable like any other folder:",[592,940,942],{"className":594,"code":941,"filename":596,"language":597,"meta":598,"style":598},"ls \u002F.snapshots\u002F1\u002Fsnapshot\u002Fetc\u002Fssh\u002F\n",[415,943,944],{"__ignoreMap":598},[602,945,946,949],{"class":604,"line":605},[602,947,948],{"class":608},"ls",[602,950,951],{"class":612}," \u002F.snapshots\u002F1\u002Fsnapshot\u002Fetc\u002Fssh\u002F\n",[399,953,954,955,958],{},"To see exactly what changed between a snapshot and the live system (",[415,956,957],{},"0"," always means \"current\") before touching anything:",[592,960,962],{"className":594,"code":961,"filename":596,"language":597,"meta":598,"style":598},"sudo snapper status 1..0\n",[415,963,964],{"__ignoreMap":598},[602,965,966,968,970,973],{"class":604,"line":605},[602,967,609],{"class":608},[602,969,627],{"class":612},[602,971,972],{"class":612}," status",[602,974,975],{"class":612}," 1..0\n",[399,977,978],{},"That prints every file created, modified or deleted since. To undo those changes automatically:",[592,980,982],{"className":594,"code":981,"filename":596,"language":597,"meta":598,"style":598},"sudo snapper undochange 1..0\n",[415,983,984],{"__ignoreMap":598},[602,985,986,988,990,993],{"class":604,"line":605},[602,987,609],{"class":608},[602,989,627],{"class":612},[602,991,992],{"class":612}," undochange",[602,994,975],{"class":612},[399,996,997],{},"Or restore a single file by hand, which is often the safer, more surgical choice:",[592,999,1001],{"className":594,"code":1000,"filename":596,"language":597,"meta":598,"style":598},"sudo cp -a \u002F.snapshots\u002F1\u002Fsnapshot\u002Fetc\u002Fssh\u002Fsshd_config \u002Fetc\u002Fssh\u002Fsshd_config\n",[415,1002,1003],{"__ignoreMap":598},[602,1004,1005,1007,1010,1013,1016],{"class":604,"line":605},[602,1006,609],{"class":608},[602,1008,1009],{"class":612}," cp",[602,1011,1012],{"class":630}," -a",[602,1014,1015],{"class":612}," \u002F.snapshots\u002F1\u002Fsnapshot\u002Fetc\u002Fssh\u002Fsshd_config",[602,1017,1018],{"class":612}," \u002Fetc\u002Fssh\u002Fsshd_config\n",[466,1020,1021,1022,1025,1026,1028],{},"This covers the vast majority of real homelab accidents: a bad config, a deleted file, a package upgrade that broke one thing. Snapper can also ",[415,1023,1024],{},"rollback"," the entire root filesystem to an earlier snapshot (it creates a new default subvolume and boots into it on the next restart), for a system in a genuinely bad state rather than just missing one file. It's a more delicate, less common operation, worth testing once on a machine you don't mind rebooting before you actually need it for real. And if the disk itself is the problem, that's exactly the scenario your off-site ",[402,1027,263],{"href":428}," backup is for anyway.",[432,1030,1032],{"id":1031},"managing-and-pruning-snapshots","Managing and pruning snapshots",[399,1034,1035],{},"Snapshots are cheap, not free: the moment the live filesystem diverges from one, the old blocks it still references stick around. Left unchecked, months of snapshots on a server that changes a lot (container images, logs) can quietly eat real disk space.",[399,1037,1038,1039,1041,1042,671],{},"The ",[415,1040,741],{}," enabled above already prunes automatically, based on the config at ",[415,1043,1044],{},"\u002Fetc\u002Fsnapper\u002Fconfigs\u002Froot",[1046,1047,1048,1064],"table",{},[1049,1050,1051],"thead",{},[1052,1053,1054,1058,1061],"tr",{},[1055,1056,1057],"th",{},"Setting",[1055,1059,1060],{},"Default",[1055,1062,1063],{},"What it does",[1065,1066,1067,1093,1107],"tbody",{},[1052,1068,1069,1085,1090],{},[1070,1071,1072,1075,1076,1075,1079,1075,1082],"td",{},[415,1073,1074],{},"TIMELINE_LIMIT_HOURLY"," \u002F ",[415,1077,1078],{},"_DAILY",[415,1080,1081],{},"_MONTHLY",[415,1083,1084],{},"_YEARLY",[1070,1086,1087],{},[415,1088,1089],{},"10",[1070,1091,1092],{},"How many timeline snapshots of each granularity to keep",[1052,1094,1095,1100,1104],{},[1070,1096,1097],{},[415,1098,1099],{},"TIMELINE_LIMIT_WEEKLY",[1070,1101,1102],{},[415,1103,957],{},[1070,1105,1106],{},"Off by default",[1052,1108,1109,1114,1119],{},[1070,1110,1111],{},[415,1112,1113],{},"NUMBER_LIMIT",[1070,1115,1116],{},[415,1117,1118],{},"50",[1070,1120,1121,1122,1125],{},"How many manual (",[415,1123,1124],{},"single",") snapshots to keep",[399,1127,1128],{},"Adjust these to taste, then delete one immediately by hand if you need the space back right now:",[592,1130,1132],{"className":594,"code":1131,"filename":596,"language":597,"meta":598,"style":598},"sudo snapper delete 1\n",[415,1133,1134],{"__ignoreMap":598},[602,1135,1136,1138,1140,1143],{"class":604,"line":605},[602,1137,609],{"class":608},[602,1139,627],{"class":612},[602,1141,1142],{"class":612}," delete",[602,1144,1146],{"class":1145},"swwWl"," 1\n",[399,1148,1149,1150,1153],{},"Check actual disk usage with ",[415,1151,1152],{},"df -h \u002F",": the numbers above only cap how many snapshots exist, not the space a very active server can still burn through between cleanups.",[399,1155,1156],{},"That's it: a rolling, automatic undo button for your server, quietly bracketing every update and pruning itself, running alongside the real backups Backrest is already taking off-site.",[1158,1159,1160],"style",{},"html pre.shiki code .sEgDM, html code.shiki .sEgDM{--shiki-light:#B392F0;--shiki-default:#FFCB6B;--shiki-dark:#B392F0}html pre.shiki code .s11XM, html code.shiki .s11XM{--shiki-light:#9ECBFF;--shiki-default:#C3E88D;--shiki-dark:#9ECBFF}html pre.shiki code .sJWha, html code.shiki .sJWha{--shiki-light:#79B8FF;--shiki-default:#C3E88D;--shiki-dark:#79B8FF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szyEh, html code.shiki .szyEh{--shiki-light:#F97583;--shiki-default:#F07178;--shiki-dark:#F97583}html pre.shiki code .s8jd1, html code.shiki .s8jd1{--shiki-light:#E1E4E8;--shiki-default:#89DDFF;--shiki-dark:#E1E4E8}html pre.shiki code .s8K8j, html code.shiki .s8K8j{--shiki-light:#9ECBFF;--shiki-default:#89DDFF;--shiki-dark:#9ECBFF}html pre.shiki code .srnIM, html code.shiki .srnIM{--shiki-light:#B392F0;--shiki-default:#89DDFF;--shiki-dark:#B392F0}html pre.shiki code .slcoZ, html code.shiki .slcoZ{--shiki-light:#E1E4E8;--shiki-default:#EEFFFF;--shiki-dark:#E1E4E8}html pre.shiki code .s8-mJ, html code.shiki .s8-mJ{--shiki-light:#79B8FF;--shiki-default:#EEFFFF;--shiki-dark:#79B8FF}html pre.shiki code .swwWl, html code.shiki .swwWl{--shiki-light:#79B8FF;--shiki-default:#F78C6C;--shiki-dark:#79B8FF}",{"title":598,"searchDepth":622,"depth":622,"links":1162},[1163,1164,1171,1172,1173,1174],{"id":434,"depth":622,"text":435},{"id":476,"depth":622,"text":477,"children":1165},[1166,1167,1168,1169,1170],{"id":501,"depth":790,"text":502},{"id":515,"depth":790,"text":516},{"id":529,"depth":790,"text":530},{"id":547,"depth":790,"text":548},{"id":560,"depth":790,"text":561},{"id":572,"depth":622,"text":573},{"id":839,"depth":622,"text":840},{"id":930,"depth":622,"text":931},{"id":1031,"depth":622,"text":1032},[],"Format Debian's root filesystem with BTRFS and use Snapper to instantly roll back a risky update or config change, as a local complement to Backrest's off-site 3-2-1 backups.","md",null,{},true,{"title":267,"description":1176},"56z2JrmgO2VltnYXrSGs-RXn0XfMRvSPM6b9EYvWhGE",[1184,1186],{"title":263,"path":264,"stem":265,"description":1185,"children":-1},"Install Backrest, a friendly web UI for restic, and back up your server properly following the 3-2-1 rule, to a local disk, another server, S3, or Backblaze B2.",{"title":271,"path":277,"stem":278,"description":1187,"icon":25,"children":-1},"Introduction to Stockeex, a personal project for stock and inventory management. Documentation coming soon.",1788956839592]