1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/minetest_ynh.git synced 2024-09-03 20:36:00 +02:00

Fix backup and restore scripts

This commit is contained in:
Luc Didry 2017-10-20 13:14:39 +02:00
parent 9d68f09bfc
commit b8f3e07594
2 changed files with 6 additions and 6 deletions

View file

@ -35,19 +35,19 @@ is_public=$(ynh_app_setting_get $app is_public)
#================================================= #=================================================
# CONFIGURATION # CONFIGURATION
#================================================= #=================================================
CHECK_SIZE "/etc/minetest.conf" CHECK_SIZE "/etc/minetest/minetest.conf"
ynh_backup "/etc/minetest.conf" ynh_backup "/etc/minetest/minetest.conf"
#================================================= #=================================================
# DATA # DATA
#================================================= #=================================================
echo ".backup /tmp/map.sqlite" | sqlite3 /var/games/minetest-server/.minetest/worlds/world/map.sqlite
ls -lh /tmp/map.sqlite
CHECK_SIZE "/var/games/minetest-server/" CHECK_SIZE "/var/games/minetest-server/"
ynh_backup "/var/games/minetest-server/" ynh_backup "/var/games/minetest-server/"
echo ".backup /tmp/map.sqlite" | sqlite3 /var/games/minetest-server/.minetest/worlds/world
CHECK_SIZE "/tmp/map.sqlite" CHECK_SIZE "/tmp/map.sqlite"
ynh_backup "/tmp/map.sqlite" ynh_backup "/tmp/map.sqlite"
ynh_secure_remove "/tmp/map.sqlite"
#================================================= #=================================================
# BACKUP OF APT PREFERENCES AND SOURCES.LIST # BACKUP OF APT PREFERENCES AND SOURCES.LIST

View file

@ -40,7 +40,7 @@ service minetest stop
#================================================= #=================================================
# CONFIGURATION # CONFIGURATION
#================================================= #=================================================
ynh_restore_file "/etc/minetest.conf" ynh_restore_file "/etc/minetest/minetest.conf"
#================================================= #=================================================
# DATA # DATA
@ -48,7 +48,7 @@ ynh_restore_file "/etc/minetest.conf"
ynh_restore_file "/var/games/minetest-server/" ynh_restore_file "/var/games/minetest-server/"
ynh_restore_file "/tmp/map.sqlite" ynh_restore_file "/tmp/map.sqlite"
echo ".restore /tmp/map.sqlite" | sqlite3 /var/games/minetest-server/.minetest/worlds/world echo ".restore /tmp/map.sqlite" | sqlite3 /var/games/minetest-server/.minetest/worlds/world/map.sqlite
#================================================= #=================================================
# BACKUP OF APT PREFERENCES AND SOURCES.LIST # BACKUP OF APT PREFERENCES AND SOURCES.LIST