Backup of BTRFS - Convert to EXT4 - Restore

Backup and restore solutions, issues, experiences
Locked
User avatar
StephenM
Posts: 69
Joined: 11 Jan 2021, 21:55

Backup of BTRFS - Convert to EXT4 - Restore

Post by StephenM »

In another thread I've been advised that BTRFS is not 100% reliable on older linux kernels (which apparently I have)

I've managed to acquire a hard drive with enough capacity to take a copy or a backup of my existing raid5 array. It is mounted /mnt/md1 and the original array is mounted on /mnt/md1

What is the recommended way to backup or copy the existing array? And then restore or copy back.

I was thinking -

1) Stop all running applications, such as Docker, Plex etc.(maybe having a look at what system services are running and close any as necessary)
2) ssh to the TNAS and execute (as root) :

Code: Select all

cp -ax /mnt/md0 /mnt/md1
3) Go for a nap
4) Reformat /mnt/md0 to EXT4 (not sure of the best option for this - Using the desktop Volume Manager - delete and re-create?)
5)

Code: Select all

cp -ax /mnt/md1 /mnt/md0
- Assuming the newly created Volume mounts on /mnt/md0
6) Go for another nap
7) Restart the services.

Any and all suggestions welcome.
User avatar
StephenM
Posts: 69
Joined: 11 Jan 2021, 21:55

Re: Backup of BTRFS - Convert to EXT4 - Restore

Post by StephenM »

Looking at what

Code: Select all

mount
reports, I'm not sure I understand what this mount point is doing:

Code: Select all

/dev/mapper/vg0-lv0 on /mnt/md0/appdata/docker/btrfs type btrfs (rw,relatime,space_cache,metadata_ratio=50,subvolid=258,subvol=/appdata/docker/btrfs)
There is a sub volumes folder in there which is filled with loads of directories each of which look to be linux root directories (assuming for docker containers).

Will the cp command in my original post copy these sub volumes?

Or can I forget about them and they'll re-create when I restart docker?
Locked