[SOLVED] Doubt about dietpi-backup missing includes

DietPi version | dietpi@DietPi:~$ cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=17
G_DIETPI_VERSION_RC=2
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
G_LIVE_PATCH_STATUS[0]='not applied'
G_LIVE_PATCH_STATUS[1]='not applied'

Distro version | dietpi@DietPi:~$ echo $G_DISTRO_NAME $G_RASPBIAN
bullseye 0

Kernel version | uname -a
Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux

SBC model | echo $G_HW_MODEL_NAME
RPi 3 Model B+ (aarch64)

Power supply used | (EG: 5V 1A RAVpower)
5V 3A
SD card used | (EG: SanDisk ultra)
SanDisk 32GB
DietPi v8.17.2 : 07:29 - Tue 05/23/23
Device model : RPi 3 Model B+ (aarch64)

dietpi-backup info let’s us know userdata may not be included if userdata has been moved to an external drive (USBdrive)

In my case it’s an ext4 USB drive (USBdrive) so I edited

/boot/dietpi/.dietpi-backup_inc_exc


+ /mnt/USBdrive/dietpi_userdata/homeassistant/
+ /mnt/dietpi_userdata/
- /mnt/*
- /media/

and backed up to a different second external ext4 USB drive (USBdriveNEW)

However, it seems

mnt/USBdrive/dietpi_userdata/homeassistant/

is not backed up to

/mnt/USBdriveNEW/dietpi-backup/data/mnt/USBdrive/dietpi_userdata/homeassistant

inspite of the fact that “Includes need to be defined before their wildcard exclude rule” as I have defined.

Actually there is nothing inside

/mnt/USBdriveNEW/dietpi-backup/data/mnt

Any clues on what step I may be missing? Because every folder is backed up except

- /mnt/*
- /media/

but
/mnt/USBdrive/dietpi_userdata/homeassistant/

should have been backed up as well

Thank you in advance!

Maybe this post can clear up things:

Every (otherwise excluded) parent directory of an included directory needs to be included as well

2 Likes

And also possibly this: DietPi-Backup in an multi-device environment - DietPi blog

1 Like

Thank you to both. @Jappe I think that quote and the example in the post you link to should show in the utility description as it certainly clarifies. Is it ok to fork and commit?

2 Likes

I would appreciate a docu commit.
You can put me as a reviewer on it.

Yeah DietPi Docs might be a good place. Probably we could as a hint into dietpi-backup to check docs for further information.

1 Like

Pull request published @StephanStS I couldn’t add you as reviewer, sorry, I saw no option but please feel free to review in github anytime.

Adding GitHub PR as reference Add DietPi-Backup filter syntax description by mixpc · Pull Request #890 · MichaIng/DietPi-Docs · GitHub