Subvol is a simple tool for BTRFS subvolumes and snapshots.
subvol help subvol list subvol create SUBVOLUME subvol delete SUBVOLUME subvol snapshot help subvol snapshot list SUBVOLUME subvol snapshot create [SUBVOLUME|all] [HINT] subvol snapshot delete SUBVOLUME [SNAPSHOT|NUMBER|RANGE] subvol snapshot rollback SUBVOLUME [SNAPSHOT|NUMBER] subvol struct help subvol struct check subvol struct init subvol free The subvolumes and snapshots are organized in the folowing directories:
/subvol /subvol/subvolumes /subvol/snapshots Note that by default the structure is on the file system root. You can change the variableSUBVOL_BASE_DIR to use another directory.
Copy the scriptsubvol to/usr/local/bin/ sudo cp' subvol' ' /usr/local/bin/' ; sudo chmod +x' /usr/local/bin/subvol' ; Initiate thesubvol structure on/subvol directory Automatic snapshot on system boot Execute these steps to enable automatic snapshots on boot.
Copy the service script to/etc/systemd/system: sudo cp' subvol-snapshot-auto.service' ' /etc/systemd/system/' Enable the service script: sudo systemctlenable subvol-snapshot-auto.service // The end