Skip to content

Commit

Permalink
Merge pull request #417 from yungwine/backup
Browse files Browse the repository at this point in the history
fix restore_backup
  • Loading branch information
igroman787 authored Feb 3, 2025
2 parents f483fc3 + ff0c64e commit b8086d0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mytonctrl/scripts/restore_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ do
esac
done

if [ ! -f "$name" ]; then
echo "Backup file not found, aborting."
exit 1
fi

COLOR='\033[92m'
ENDC='\033[0m'
Expand Down Expand Up @@ -43,6 +47,8 @@ rm -rf /var/ton-work/db/keyring

chown -R $user:$user ${tmp_dir}/mytoncore
chown -R $user:$user ${tmp_dir}/keys
chown validator:validator ${tmp_dir}/keys
chown -R validator:validator ${tmp_dir}/db

cp -rfp ${tmp_dir}/db /var/ton-work
cp -rfp ${tmp_dir}/keys /var/ton-work
Expand Down

0 comments on commit b8086d0

Please sign in to comment.