this post was submitted on 11 May 2025
        
      
      62 points (98.4% liked)
      Linux
    59281 readers
  
      
      1298 users here now
      From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
        founded 6 years ago
      
      MODERATORS
      
    you are viewing a single comment's thread
view the rest of the comments
    view the rest of the comments
The command you're looking for is
btrfs send. Seeman btrfs-send.I know of at least one tool, btrbk, which automates both automatic periodic snapshots and incremental sync, but here's an example manual process so you can know the basic idea. Run all this in a root shell or sudo.
As initial setup:
btrfs subvolume create /mnt/mybtrfs/stuffon the sender, substituting the actual mount point of your btrfs filesystem and the name you want to use for a subvolume under it.-o subvol=stuffif you want to treat the subvolume as its own separate mount from its parent.mkdir /mnt/mybtrfs/snapshots; btrfs subvolume snapshot /mnt/mybtrfs/stuff /mnt/mybtrfs/snapshots/stuff-20250511.btrfs send /mnt/mybtrfs/snapshots/stuff-20250511 | btrfs receive /mnt/backup. You can runbtrfs receivethrough SSH if the receiver is a separate system.For incremental syncs after that:
btrfs subvolume snapshot /mnt/mybtrfs/stuff /mnt/mybtrfs/snapshots/stuff-20250518.-poption to specify a subvolume of the last successful sync to make it incremental.btrfs send -p /mnt/mybtrfs/snapshots/stuff-20250511 /mnt/mybtrfs/snapshots/stuff-20250518 | btrfs receive /mnt/backup.If you want to script a process like this, make sure the receiver stores the name of the latest synced snapshot somewhere only after the receive completes successfully, so that you aren't trying to do incremental syncs based on a parent that didn't finish syncing.