Hi,
I would like to backup a quite few more configuration files within the excellent Yunohost backup system.
I found out about this page and tried to apply it but it was a remarkable failure.
What I did :
- I created the file
/etc/yunohost/hooks.d/backup/99-conf_custom
and edited it with something like :
#!/bin/bash
# Source YNH helpers
source /usr/share/yunohost/helpers
ynh_backup_dest (){
YNH_CWD="${YNH_BACKUP_DIR%/}/$1"
mkdir -p $YNH_CWD
cd "$YNH_CWD"
}
# Exit hook on subcommand error or unset variable
ynh_abort_if_errors
# SnapCast
ynh_backup_dest "conf/custom/snapcast"
ynh_backup "/etc/default/snapclient"
ynh_backup "/etc/default/snapserver"
# Mopidy
ynh_backup_dest "conf/custom/mopidy"
ynh_backup "/etc/mopidy/mopidy.conf"
Then, I wanted to try it with the command :
root@box:~# yunohost backup create --method custom
(Is this command correct ?)
And then, the greek tragedy :
Warning: /usr/share/yunohost/helpers.d/backup: line 101: src_path: unbound variable
Error: Could not run script: /etc/yunohost/hooks.d/backup/99-conf_custom
Error: Could not backup the 'conf_custom' system part
I would be highly delighted if anyone could help me on this.
Peace
Charly