Commit 4ea3eb72 authored by Nicolas Wavrant's avatar Nicolas Wavrant

erp5: check repozo backup before restoring it

parent 6ac8bccd
...@@ -78,7 +78,7 @@ md5sum = 83e69244728a0d323f535dd3e8b734b6 ...@@ -78,7 +78,7 @@ md5sum = 83e69244728a0d323f535dd3e8b734b6
[template-zeo] [template-zeo]
filename = instance-zeo.cfg.in filename = instance-zeo.cfg.in
md5sum = 47b2759adcdf784359d2e015ef3fae55 md5sum = c076c9e182220c70553298704cecb82d
[template-zope] [template-zope]
filename = instance-zope.cfg.in filename = instance-zope.cfg.in
......
...@@ -144,6 +144,12 @@ input = inline: #!/bin/sh ...@@ -144,6 +144,12 @@ input = inline: #!/bin/sh
fi fi
echo "Removing $zodb_path..." echo "Removing $zodb_path..."
echo "Restoring $storage_name into $zodb_path..." echo "Restoring $storage_name into $zodb_path..."
$repozo --verify --repository="$zodb_backup_directory/$storage_name"
CURRENT_EXIT_CODE=$?
if [ ! "$CURRENT_EXIT_CODE"="0" ]; then
EXIT_CODE="$CURRENT_EXIT_CODE"
echo "$storage_name Backup verification failed. Backup data is inconsistent."
fi
$repozo --recover --output="$zodb_directory/$zodb_path" --repository="$zodb_backup_directory/$storage_name" $repozo --recover --output="$zodb_directory/$zodb_path" --repository="$zodb_backup_directory/$storage_name"
CURRENT_EXIT_CODE=$? CURRENT_EXIT_CODE=$?
if [ ! "$CURRENT_EXIT_CODE"="0" ]; then if [ ! "$CURRENT_EXIT_CODE"="0" ]; then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment