mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
fix the backup
This commit is contained in:
parent
cecc78a652
commit
5952eb8feb
1 changed files with 3 additions and 4 deletions
|
@ -427,7 +427,6 @@ TEST_BACKUP_RESTORE () {
|
||||||
local main_result=0
|
local main_result=0
|
||||||
|
|
||||||
# Remove the previous residual backups
|
# Remove the previous residual backups
|
||||||
sudo rm -rf ./ynh_backups
|
|
||||||
RUN_INSIDE_LXC rm -rf /home/yunohost.backup/archives
|
RUN_INSIDE_LXC rm -rf /home/yunohost.backup/archives
|
||||||
|
|
||||||
# BACKUP
|
# BACKUP
|
||||||
|
@ -446,7 +445,7 @@ TEST_BACKUP_RESTORE () {
|
||||||
[ $ret -eq 0 ] || main_result=1
|
[ $ret -eq 0 ] || main_result=1
|
||||||
|
|
||||||
# Grab the backup archive into the LXC container, and keep a copy
|
# Grab the backup archive into the LXC container, and keep a copy
|
||||||
sudo lxc file pull -r $LXC_NAME/home/yunohost.backup/archives ./ynh_backups
|
sudo lxc file pull -r $LXC_NAME/home/yunohost.backup/archives $TEST_CONTEXT/ynh_backups
|
||||||
|
|
||||||
# RESTORE
|
# RESTORE
|
||||||
# Try the restore process in 2 times, first after removing the app, second after a restore of the container.
|
# Try the restore process in 2 times, first after removing the app, second after a restore of the container.
|
||||||
|
@ -468,10 +467,10 @@ TEST_BACKUP_RESTORE () {
|
||||||
LOAD_LXC_SNAPSHOT snap0
|
LOAD_LXC_SNAPSHOT snap0
|
||||||
|
|
||||||
# Remove the previous residual backups
|
# Remove the previous residual backups
|
||||||
RUN_INSIDE_LXC rm -f /rootfs/home/yunohost.backup/archives/*
|
RUN_INSIDE_LXC rm -rf /home/yunohost.backup/archives
|
||||||
|
|
||||||
# Place the copy of the backup archive in the container.
|
# Place the copy of the backup archive in the container.
|
||||||
sudo lxc file push -r ./ynh_backups/archives/* $LXC_NAME/home/yunohost.backup/archives/
|
sudo lxc file push -r $TEST_CONTEXT/ynh_backups/archives $LXC_NAME/home/yunohost.backup/
|
||||||
|
|
||||||
log_small_title "Restore on a fresh YunoHost system..."
|
log_small_title "Restore on a fresh YunoHost system..."
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue