---
title: 'move btrfs subvol to other server'
url: 'https://willifix.net/blog/move-btrfs-subvol-to-other-server'
markdown: 'https://willifix.net/blog/move-btrfs-subvol-to-other-server.md'
date: '2024-04-29'
description: 'In the last days i have to move some Docker Containers from one host to another. First i start by simple scp the /var/lib/docker Directory to the new place. However, I quickly realized that this would take too long (many small files). So i started looking for alternatives. I could still remember th…'
---

# move btrfs subvol to other server

## [move btrfs subvol to other server](https://willifix.net/blog/move-btrfs-subvol-to-other-server)

    29th Apr 2024  

In the last days i have to move some Docker Containers from one host to another. First i start by simple scp the /var/lib/docker Directory to the new place. However, I quickly realized that this would take too long (many small files). So i started looking for alternatives. I could still remember that a btrfs works under the Docker. Solution found 😀

1. create a Snapshot of the Subvolume that contains the Docker staff:

```sh
    btrfs subvolume snapshot -r /var /var/backup 
    sync
```

After this we can distribute a copy of this subvolume to the new Server that also have a btrfs Filesystem running with btrfs send and btrfs receive

```sh
    btrfs send /var/backup | ssh mover@target "btrfs receive /var/target"
```

This can take some time but is much faster then scp because a stream is send. If all is sucessfull you have a copy of the Subvolume on the target server. you can copy the needed stuff or make the Subvolume rw.

for more Informations have a look:

[https://archive.kernel.org/oldwiki/btrfs.wiki.kernel.org/index.php/Incremental\_Backup.html](https://archive.kernel.org/oldwiki/btrfs.wiki.kernel.org/index.php/Incremental_Backup.html)

 [ Previous Post](https://willifix.net/blog/install-racadm-for-idrac-on-proxmox-7-8) [Next Post ](https://willifix.net/blog/host2vm-migration-script)

---

## Navigation

- Parent: [Blog](https://willifix.net/blog.md)
- Previous: [Host2vm Migration Script](https://willifix.net/blog/host2vm-migration-script.md)
- Next: [install racadm for IDRAC on Proxmox 7/8](https://willifix.net/blog/install-racadm-for-idrac-on-proxmox-7-8.md)
