Backup own settings/files


I would like to backup some of my “own” files like some python scrips or /etc/sysconfig/firewall.local.
I’ve read that adding a text file to subfolder


will do the job. Looking into the existing file haproxy and its content


it looks like adding all necessary files and their path will backup the files in question, right?
May I further assume that this file


is the better option to add those files?
Can I use a syntax like


to backup whole directories, including files and nested subfolders?


Hi @Hellfire,

the /var/ipfire/backup/addons/includes directory is intended for the backup lists for any installed addon to be stored. I can’t be certain that anything additional added in there will stay in place during an upgrade.

Yes, this is absolutely the correct place to list the files/directories that you want to be backed up. They will then be included as part of the overall IPFire backup.

will backup everything in the metrics directory including any subdirectories.

You can use wildcards to specify specific files in directories as well.
will save all files in that directory starting with disk-space.
You can also add multiple lines for that directory with different wildcards.

You could probably use standard regex commands but I don’t know that for certain and am not familiar enough with the backup perl code to know that without looking in some detail but you could give it a try and see if it worked.


Thanks Adolf for your reply!

A quick test already showed me that I’m correct and you of course, too. I had a further look into the backup Perl script /var/ipfire/backup/bin/, too, that showed me that regular expressions may not apply since the script obviously reads line by line and backs up the given file or folder.

But I may be wrong in interpreting the perl script lines:

	tar cvzf "${filename}" \
		--exclude-from="/var/ipfire/backup/exclude" \
		--exclude-from="/var/ipfire/backup/exclude.user" \
		$(process_includes "/var/ipfire/backup/include" "/var/ipfire/backup/include.user") \


Hi Michael,

I looked through the tar manual and found a section on wildcards. So you can specify for instance that all files in a directory should be backed up except those that end in pa by adding the line in your example of

I tested this out and was able to filter out all files ending in pa but including all the other files, even if they had pa within the filename somewhere.

The following is the link to the wildcards section in the tar manual