Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit f80c0692 authored by Arthur BOUDREAULT's avatar Arthur BOUDREAULT
Browse files

refactor: add number_day_to_keep in dictionary + update README

parent 25d09172
No related branches found
No related tags found
1 merge request!39Resolve "refactor: improve backup usage README"
...@@ -30,10 +30,8 @@ ynh_backup: ...@@ -30,10 +30,8 @@ ynh_backup:
scheduled_month: "*" scheduled_month: "*"
system: True system: True
apps: True apps: True
src_script: "templates/ynh_backup.sh.j2" number_days_to_keep: "2"
dest_script: "/usr/bin"
number_days_to_keep: "2"
``` ```
- `ynh_backup.scheduled` : active la fonctionnalité de sauvegarde des applications YunoHost en mettant la valeur à `True`. - `ynh_backup.scheduled` : active la fonctionnalité de sauvegarde des applications YunoHost en mettant la valeur à `True`.
......
#!/bin/bash #!/bin/bash
today="$(date +%Y%m%d)" today="$(date +%Y%m%d)"
number_to_keep="{{ number_days_to_keep }}" number_to_keep="{{ ynh_backup.number_days_to_keep | default("2") }}"
old_backup_list="$(yunohost backup list --output-as plain | head -n -"$number_to_keep")" old_backup_list="$(yunohost backup list --output-as plain | head -n -"$number_to_keep")"
_good() { _good() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment