diff --git a/README-FR.md b/README-FR.md
index ae8320e2e9f02319c1b46afdba25aec31adb86d7..472fb7513d6b7b7a6f7c0d6923f33f68df0aba18 100644
--- a/README-FR.md
+++ b/README-FR.md
@@ -123,7 +123,7 @@ Il est possible de compléter l'installation des applications par l'ajout de tem
 Pour activer cette fonctionnalité, définissez la variable `post_install` qui correspond à la liste des fichiers de post-installation de votre application.
 Cette tâche utilisant le module template, vous pouvez tout à fait utiliser vos propres variables et les appeler dans vos fichiers de template. Pour en savoir sur ce module, cliquez [ici](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/template_module.html).
 
-- `src` est obligatoire. Il s'agit du répertoire où le fichier de template se situe sur la machine qui execute Ansible.
+- `src` est obligatoire. Il s'agit du répertoire où le fichier de template se situe sur la machine qui exécute Ansible.
 - `dest` est obligatoire. Il s'agit du répertoire où le fichier de template va être stocké.
 - `type` est obligatoire :
   - Si vous précisez comme valeur `script` alors le fichier de template aura pour droits 740. Il sera exécuté après son transfert sur le serveur Yunohost (généralement dans `/tmp/`) puis il sera supprimé. 
@@ -134,25 +134,22 @@ Pour `owner` et `group`, par défaut le fichier va prendre comme utilisateur pro
 ### Gestion des sauvegardes
 
 ```yml
-- name: Create cron task to perform YNH apps backup
-  ansible.builtin.cron:
-    name: "auto-backup apps to {{ ynh_apps_backup.directory | default('/home/yunohost.backup/archives') }}"
-    month: "{{ ynh_apps_backup.scheduled_month | default('*') }}"
-    weekday: "{{ ynh_apps_backup.scheduled_weekday | default('*') }}"
-    hour: "{{ ynh_apps_backup.scheduled_hour | default('1') }}"
-    minute: "{{ ynh_apps_backup.scheduled_minute | default('0') }}"
-    user: root
-    job: "{% if ynh_apps_backup.directory is string %}
-            yunohost backup create --apps --output-directory {{ ynh_apps_backup.directory }}_$(date +%Y%m%d_%H%M%S)
-          {% else %}
-            yunohost backup create --apps
-          {% endif %}"
-    cron_file: ynh_apps_backup_cron
+ynh_apps_backup:
+  scheduled: "true"
+  directory: "/data/backup"
+  scheduled_hour: "*"
+  scheduled_minute: "*/30"
+  scheduled_weekday: "*"
+  scheduled_month: "*"
+  src_script: "templates/ynh_apps_backup.sh.j2"
+  dest_script: "/data/backup/backup_ynh_apps.sh"
 ```
 La tâche backup va permettre de sauvegarder les applications Yunohost ainsi que leurs données grâce à la mise en place d'une tâche cron.
 - `ynh_apps_backup.scheduled` : Pour activer la fonctionnalité de sauvegarde des applications Yunohost, mettez la valeur à `true`.
 - `ynh_apps_backup.directory` : Le dossier de sauvegarde par défaut est `/home/yunohost.backup/archives` cependant vous pouvez tout à fait choisir de sauvegarder les backups dans un autre dossier grâce à cette variable. Dans ce cas, de manière à pouvoir restaurer les backups depuis l'interface web, Yunohost créé automatiquement un lien symbolique de l'archive créée vers son dossier par défaut.
 - `ynh_apps_backup.scheduled_hour/minute/weekday/month`: Permet de modifier quand la tâche cron se déclenche. Par défaut elle se déclenchera tous les jours de l'année à 1 heure du matin. Pour plus d'informations concernant les réglages horaires cron, cet outil peut être utile : https://crontab.guru/.
+- `src_script` est obligatoire. Il s'agit du répertoire où le fichier de template se situe sur la machine qui exécute Ansible.
+- `dest_script` est obligatoire. Il s'agit du répertoire où le fichier de template va être stocké.
 
 ## Dépendances
 
diff --git a/README.md b/README.md
index 56e816516ec59c1aab194c489286bb18e795bdf4..0c800721c40555642faa8520ca986ef81a98c03a 100644
--- a/README.md
+++ b/README.md
@@ -134,26 +134,23 @@ For `owner` and `group`, by default the file will take as owner the name of the
 ### Backups management
 
 ```yml
-- name: Create cron task to perform YNH apps backup
-  ansible.builtin.cron:
-    name: "auto-backup apps to {{ ynh_apps_backup.directory | default('/home/yunohost.backup/archives') }}"
-    month: "{{ ynh_apps_backup.scheduled_month | default('*') }}"
-    weekday: "{{ ynh_apps_backup.scheduled_weekday | default('*') }}"
-    hour: "{{ ynh_apps_backup.scheduled_hour | default('1') }}"
-    minute: "{{ ynh_apps_backup.scheduled_minute | default('0') }}"
-    user: root
-    job: "{% if ynh_apps_backup.directory is string %}
-            yunohost backup create --apps --output-directory {{ ynh_apps_backup.directory }}_$(date +%Y%m%d_%H%M%S)
-          {% else %}
-            yunohost backup create --apps
-          {% endif %}"
-    cron_file: ynh_apps_backup_cron
+ynh_apps_backup:
+  scheduled: "true"
+  directory: "/data/backup"
+  scheduled_hour: "*"
+  scheduled_minute: "*/30"
+  scheduled_weekday: "*"
+  scheduled_month: "*"
+  src_script: "templates/ynh_apps_backup.sh.j2"
+  dest_script: "/data/backup/backup_ynh_apps.sh"
 ```
 
 The backup task will allow to backup Yunohost applications and their data by setting up a cron job.
 - `ynh_apps_backup.scheduled`: To enable the Yunohost applications backup feature, set the value to `true`.
 - `ynh_apps_backup.directory`: The default backup folder is `/home/yunohost.backup/archives` however you can choose to save the backups in another folder with this variable. In this case, in order to be able to restore the backups from the web interface, Yunohost automatically creates a symbolic link from the created archive to its default folder.
 - `ynh_apps_backup.scheduled_hour/minute/weekday/month`: Allows you to change when the cron job is triggered. By default it will run every day of the year at 1am. For more information about cron time settings, this tool can be useful: https://crontab.guru/.
+- `src_script` is mandatory. This is the directory where the template file is located on the machine running Ansible.
+- `dest_script` is required. This is the directory where the template file will be stored.
 
 ## Dependencies
 
diff --git a/defaults/main.yml b/defaults/main.yml
index 8410b63c21edc95e908f1f22c10f331020409961..d773c28f9a6ee366f85b183efd5b760320649ee7 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -63,7 +63,7 @@ ynh_apps: null
   #       owner: ttrss # Only provide if different from app name
   #       group: ttrss # Only provide if different from www-data
 
-# Variables for backup
+# Variables for apps backup
 ynh_apps_backup:
   scheduled: "false"
   # directory: "/data/backup"
@@ -71,3 +71,5 @@ ynh_apps_backup:
   # scheduled_minute: "0"
   # scheduled_weekday: "*"
   # scheduled_month: "*"
+  # src_script: "templates/ynh_apps_backup.sh.j2"
+  # dest_script: "/data/backup/backup_ynh_apps.sh"
diff --git a/tasks/backup.yml b/tasks/backup.yml
index 15e732e125590ed78116672f57a66da010d5ca17..c454fc2540af75d4aca1d6ed9a24b2e1d53f9889 100644
--- a/tasks/backup.yml
+++ b/tasks/backup.yml
@@ -18,6 +18,20 @@
 #                                                                             #
 #-----------------------------------------------------------------------------#
 
+- name: Create backup folder
+  ansible.builtin.file:
+    path: "{{ ynh_apps_backup.directory | default('/home/yunohost.backup/') }}"
+    state: directory
+    mode: '0750'
+
+- name: Create apps backup script
+  ansible.builtin.template:
+    src: "{{ ynh_apps_backup.src_script }}"
+    dest: "{{ ynh_apps_backup.dest_script }}"
+    owner: root
+    group: root
+    mode: '0740'
+
 - name: Create cron task to perform YNH apps backup
   ansible.builtin.cron:
     name: "auto-backup apps to {{ ynh_apps_backup.directory | default('/home/yunohost.backup/archives') }}"
@@ -26,9 +40,5 @@
     hour: "{{ ynh_apps_backup.scheduled_hour | default('1') }}"
     minute: "{{ ynh_apps_backup.scheduled_minute | default('0') }}"
     user: root
-    job: "{% if ynh_apps_backup.directory is string %}
-            yunohost backup create --apps --output-directory {{ ynh_apps_backup.directory }}_$(date +%Y%m%d_%H%M%S)
-          {% else %}
-            yunohost backup create --apps
-          {% endif %}"
+    job: "{{ ynh_apps_backup.dest_script }}"
     cron_file: ynh_apps_backup_cron
diff --git a/templates/ynh_apps_backup.sh.j2 b/templates/ynh_apps_backup.sh.j2
new file mode 100644
index 0000000000000000000000000000000000000000..e973978678fbed161781845a64789980a1ad2f01
--- /dev/null
+++ b/templates/ynh_apps_backup.sh.j2
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+{% if ynh_apps_backup.directory is string %}
+yunohost backup create --apps --output-directory {{ ynh_apps_backup.directory }}/backup_$(date +%Y%m%d_%H%M%S)
+{% else %}
+yunohost backup create --apps
+{% endif %}