dietpi-backup not excluding directories

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
avr
Posts: 11
Joined: Thu Apr 05, 2018 7:35 pm

dietpi-backup not excluding directories

Post by avr »

I'm having issues making dietpi-backup to exclude directories from my user data folder.

This is my /DietPi/dietpi/.dietpi-backup_exclude file

Code: Select all

/mnt/petri
/mnt/data/dietpi-backup
/mnt/data/dietpi_userdata/downloads
/mnt/dietpi_userdata/dietpi-backup
/mnt/dietpi_userdata/downloads
When running dietpi-backup I can see it adds my directories to the 'exclude list' at /tmp/.dietpi-backup_inc_exc_list

/mnt/data/dietpi_userdata is my custom user data location.

Any idea how can I debug and find the problem?

Thanks,
Abraham
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: dietpi-backup not excluding directories

Post by Fourdee »

Hi,

You need to do it this way, using additional / at the end, else rsync treats it as a file I believe:

Code: Select all

/mnt/petri/
/mnt/data/dietpi-backup/
/mnt/data/dietpi_userdata/downloads/
/mnt/dietpi_userdata/dietpi-backup/
/mnt/dietpi_userdata/downloads/
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
avr
Posts: 11
Joined: Thu Apr 05, 2018 7:35 pm

Re: dietpi-backup not excluding directories

Post by avr »

Fourdee wrote: Thu Jun 14, 2018 9:15 am Hi,

You need to do it this way, using additional / at the end.
Thanks for the help. I tried this but didn't work.

After looking at the dietpi-backup code it looks I can't exclude directories when it's doing a user data backup, it only works for a system backup :(

Code: Select all

#rsync options
RSYNC_RUN_OPTIONS_SYSTEM_BACKUP="-aH --delete --include-from=$FP_FILTER_INCLUDE_EXCLUDE_SYSTEM_BACKUP"
RSYNC_RUN_OPTIONS_USERDATA_BACKUP="-aH --delete"
RSYNC_LOGGING_OPTIONS="-v --log-file=$LOGFILE"
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: dietpi-backup not excluding directories

Post by Fourdee »

Ah, Thanks.

We'll get this resolved for v6.10, most likley have 2 new files, one for userdata and one for system. Both having include/exclude in the same file using - and +.

Ticket: https://github.com/Fourdee/DietPi/issues/1851
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
avr
Posts: 11
Joined: Thu Apr 05, 2018 7:35 pm

Re: dietpi-backup not excluding directories

Post by avr »

Thank you ! :)
Post Reply