diff --git a/roles/ynh_backup/tasks/backup.yml b/roles/ynh_backup/tasks/backup.yml
index 688d36a98cac0fd6e892ed021788cfe341fdee6f..1b1a80a2365247125e27faab29109b5caebbed82 100644
--- a/roles/ynh_backup/tasks/backup.yml
+++ b/roles/ynh_backup/tasks/backup.yml
@@ -17,6 +17,11 @@
 # along with this program. If not, see <http://www.gnu.org/licenses/>.        #
 #                                                                             #
 #-----------------------------------------------------------------------------#
+- name: Fail if variables are not used correctly
+  ansible.builtin.fail:
+    msg: You need to define variable ynh_backup.apps and / or ynh_backup.system to True
+  when: ynh_backup.apps is false and ynh_backup.system is false
+
 
 - name: Create backup folder if doesn't already exist
   ansible.builtin.file: