Backup script often have this:
# Backup the NGINX configuration
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
# Backup the systemd service unit
ynh_backup "/etc/systemd/system/$app.service"
# Backup the logrotate configuration
ynh_backup "/etc/logrotate.d/$app"
The restore scripts often recreates these files like:
ynh_config_add_nginx
ynh_config_add_systemd
ynh_config_add_logrotate "$log_file"
So it’s nice for completeness if the backup contains the files, but makes problems, if the file path will be changes in some way (e.g.: domain changes or the create script just changes something)
So i think it’s potential for more robustness:
A) just don’t backup files, that will be recreated on restore
B) backup the files with a helper that build the path