mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Backup xmpp data
This commit is contained in:
parent
ce2c608253
commit
7e4536752e
2 changed files with 17 additions and 0 deletions
13
data/hooks/backup/27-data_xmpp
Executable file
13
data/hooks/backup/27-data_xmpp
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Exit hook on subcommand error or unset variable
|
||||
set -eu
|
||||
|
||||
# Source YNH helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
# Backup destination
|
||||
backup_dir="${1}/data/xmpp"
|
||||
|
||||
ynh_backup /var/lib/metronome "${backup_dir}/var"
|
||||
ynh_backup /var/xmpp-upload/ "${backup_dir}/xmpp-upload"
|
4
data/hooks/restore/27-data_xmpp
Normal file
4
data/hooks/restore/27-data_xmpp
Normal file
|
@ -0,0 +1,4 @@
|
|||
backup_dir="$1/data/xmpp"
|
||||
|
||||
cp -a $backup_dir/var/lib/metronome/. /var/lib/metronome
|
||||
cp -a $backup_dir/var/xmpp-upload. /var/xmpp-upload
|
Loading…
Add table
Reference in a new issue