Général
{# Type-specific config : ynh_app #}
{# Type-specific config : ynh_system — sélection des hooks #}
{% set _sys_hooks = [
('conf_ynh_settings', 'Paramètres YunoHost', false),
('conf_ynh_firewall', 'Firewall', false),
('conf_ssowat', 'Portail SSO', false),
('conf_nginx', 'Nginx', false),
('conf_ynh_certs', 'Certificats SSL', false),
('conf_ynh_domain', 'Domaines', false),
('conf_ynh_user', 'Utilisateurs LDAP', false),
('data_home', 'Répertoires home /home/*', true),
('data_mail', 'Courriers Dovecot', true),
] %}
{% set _saved_hooks = (job.config_json | fromjson).get('hooks', []) if job and job.config_json and job.type == 'ynh_system' else [] %}
Tous cochés = sauvegarde complète. Décochez les hooks volumineux pour alléger l'archive.
{% for hook_id, hook_label, heavy in _sys_hooks %}
{% endfor %}
{# Type-specific config : mysql #}
{% set db_cfg = (job.config_json | fromjson) if job and job.config_json else {} %}
Dump via sudo mysqldump — aucun mot de passe requis.
{# Type-specific config : postgresql #}
Dump via sudo -u postgres pg_dump — aucun mot de passe requis.
{# Type-specific config : custom_dir #}
{% set cd_cfg = (job.config_json | fromjson) if job and job.config_json and job.type == 'custom_dir' else {} %}
{% set cd_restore = cd_cfg.get('restore', {}) %}
{# Section restauration (optionnel, collapsible) #}
Configuration de restauration (optionnel)
{# ── Planification ── #}
{% set has_cron = job and job.cron_expr %}
Rétention
{# Mode count / daily : un seul champ N #}
{# Mode GFS : trois champs Fils / Père / Grand-Père #}
{# ── Destination ── #}
Transfert après sauvegarde
{% if destinations or remote_instances %}
{% set sel_dest_ids = job.job_destinations | selectattr('dest_type','eq','ssh') | map(attribute='dest_id') | list if job else [] %}
{% set sel_inst_ids = job.job_destinations | selectattr('dest_type','eq','instance') | map(attribute='dest_id') | list if job else [] %}
{% if destinations %}
SSH / rsync
{% for d in destinations %}
{% endfor %}
{% endif %}
{% if remote_instances %}
Instances fédérées
{% for inst in remote_instances %}
{% endfor %}
{% endif %}
{% else %}
Aucune destination configurée.
Créer une destination SSH →
|
Ajouter une instance fédérée →
{% endif %}
{# ── Options ── #}