diff --git a/roles/ynh_backup/README-FR.md b/roles/ynh_backup/README-FR.md
index 4e45bbd9c4e7a5013fc141ae02aa5225d0ce588a..178a5585b186ede4f6d4953da18abe4a579f9ec6 100644
--- a/roles/ynh_backup/README-FR.md
+++ b/roles/ynh_backup/README-FR.md
@@ -39,7 +39,7 @@ ynh_backup:
 - `ynh_backup.scheduled_[hour|minute|weekday|month]`: modifie la planification de la tâche cron. Par défaut, elle se déclenchera tous les jours de l'année à 3 heure du matin. Pour plus d'informations concernant les réglages horaires cron, cet outil peut être utile : <https://crontab.guru/>.
 - `ynh_backup.system` : Désactivez la sauvegarde du système YunoHost en mettant la valeur à `False`, la valeur par défaut est à `True`.
 - `ynh_backup.apps` : Désactivez la sauvegarde des applications YunoHost en mettant la valeur à `False`, la valeur par défaut est à `True`.
-- `number_days_to_keep` : Détermine le nombre de jours à garder pour le système de purge.
+- `ynh_backup.number_days_to_keep` : Détermine le nombre de jours à garder pour le système de purge, la valeur par défaut est 2.
 - ⚠️ Attention, à partir du moment où vous activez la fonctionnalité de sauvegarde locale `ynh_backup.scheduled`, vous ne pouvez pas désactiver les sauvegardes système **et** applications. Si vous mettez `ynh_backup.system` **et** `ynh_backup.apps` à `False`, le rôle tombera en erreur.
 
 ### Sauvegardes distantes avec BorgBackup
diff --git a/roles/ynh_backup/README.md b/roles/ynh_backup/README.md
index e65fed6a0e9ea8c5962afe45197981b8b3f35a02..59ba5168fc2df7756946f846123cbb6fc0d76cf3 100644
--- a/roles/ynh_backup/README.md
+++ b/roles/ynh_backup/README.md
@@ -39,7 +39,7 @@ ynh_backup:
 - `ynh_backup.scheduled_[hour|minute|weekday|month]`: modifies the scheduling of the cron task. By default, it will run every day of the year at 3am. For more information about cron time settings, this tool can be useful: <https://crontab.guru/>.
 - `ynh_backup.system`: Disable YunoHost system backup by setting the value to `False`, the default value is `True`.
 - `ynh_backup.apps`: Disable backup of YunoHost applications by setting the value to `False`, the default is `True`.
-- `number_days_to_keep` : Determines the number of days to keep for the purging system.
+- `ynh_backup.number_days_to_keep` : Determines the number of days to keep for the purging system, the default is 2.
 - ⚠️ Beware, once you enable the local backup feature `ynh_backup.scheduled`, you cannot disable system **and** application backups. If you set `ynh_backup.system` **and** `ynh_backup.apps` to `False`, the role will fail.
 
 ### remote backups with YunoHost BorgBackup
diff --git a/roles/ynh_backup/defaults/main.yml b/roles/ynh_backup/defaults/main.yml
index 160406038f1ea1354fb401ca91932d2e2c94a3c4..7b616acd0a2066a84737d082adaccb1afbe9333a 100644
--- a/roles/ynh_backup/defaults/main.yml
+++ b/roles/ynh_backup/defaults/main.yml
@@ -21,15 +21,6 @@
 # Variables for local YunoHost backups
 ynh_backup:
   scheduled: False
-  directory: "/data/backup"
-  scheduled_hour: "3"
-  scheduled_minute: "0"
-  scheduled_weekday: "*"
-  scheduled_month: "*"
-  system: True
-  apps: True
-
-number_days_to_keep: "2"
 
 # Variables for YunoHost BorgBackup
 ynh_borg_backup_scheduled: False
diff --git a/roles/ynh_backup/tasks/backup.yml b/roles/ynh_backup/tasks/backup.yml
index 0451b0105163c4f9f85203981a74e0275bd42b3a..94ebd0b863bec716c6ec53bd45e01f664daf5dc7 100644
--- a/roles/ynh_backup/tasks/backup.yml
+++ b/roles/ynh_backup/tasks/backup.yml
@@ -25,9 +25,10 @@
 
 - name: Create backup folder if doesn't already exist
   ansible.builtin.file:
-    path: "{{ ynh_backup.directory | default('/home/yunohost.backup/archives') }}"
+    path: "{{ ynh_backup.directory }}"
     state: directory
     mode: '0750'
+  when: ynh_backup.directory is defined
   tags: backup
 
 - name: Create backup script
@@ -41,7 +42,7 @@
 
 - name: Create cron task to schedule YNH backup script
   ansible.builtin.cron:
-    name: "auto-backup to {{ ynh_backup.directory | default('/home/yunohost.backup/archives') }}"
+    name: "auto-backup to {{ ynh_backup.directory | default(_ynh_backup_directory) }}"
     month: "{{ ynh_backup.scheduled_month | default('*') }}"
     weekday: "{{ ynh_backup.scheduled_weekday | default('*') }}"
     hour: "{{ ynh_backup.scheduled_hour | default('1') }}"
diff --git a/roles/ynh_backup/templates/ynh_backup.sh.j2 b/roles/ynh_backup/templates/ynh_backup.sh.j2
index 3965bc19458cafeb02f114c556036d894eac394f..6f74f4b90194269917285d48b8024eba015aa95a 100644
--- a/roles/ynh_backup/templates/ynh_backup.sh.j2
+++ b/roles/ynh_backup/templates/ynh_backup.sh.j2
@@ -13,7 +13,7 @@ _fail() {
 
 _create_ynh_backup() {
   echo "Backing up $today YunoHost data now."
-  yunohost backup create {% if ynh_backup.system | default(True) %}--system{% endif %}{% if ynh_backup.apps | default(True) %} --apps{% endif %}{% if ynh_backup.directory | default("/data/backup") %} --output-directory {{ ynh_backup.directory }}/backup_"$today" {% endif %} || _fail "can't create a backup"
+  yunohost backup create {% if ynh_backup.system | default(True) %}--system{% endif %}{% if ynh_backup.apps | default(True) %} --apps{% endif %}{% if ynh_backup.directory is defined %} --output-directory {{ ynh_backup.directory }}/backup_"$today" {% endif %} || _fail "can't create a backup"
 
 }
 
diff --git a/roles/ynh_backup/vars/main.yml b/roles/ynh_backup/vars/main.yml
index 9fda3911fd52f752104ddfb21e52213afb3317b5..2b41c9e8c1e4ddc11ca61e218d158307e4e65b48 100644
--- a/roles/ynh_backup/vars/main.yml
+++ b/roles/ynh_backup/vars/main.yml
@@ -21,3 +21,4 @@
 # Variables for backup
 ynh_backup_src_script: "templates/ynh_backup.sh.j2"
 ynh_backup_dest_script: "/usr/local/bin/ynh_backup.sh"
+_ynh_backup_directory: "/home/yunohost.backup/archives"