fix backup restore operation, closes #81

This commit is contained in:
Sameer Naik 2014-06-14 21:09:53 +05:30
parent 15f9b40705
commit d433698b67
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,7 @@
# Changelog
**latest**
- fix restore backup operation
- upgrade to gitlab-shell 1.9.6
- added app:sanitize command
- automatically migrate database when gitlab version is updated

View File

@ -524,19 +524,19 @@ appRake () {
if [ "$1" == "gitlab:backup:restore" ]; then
# user needs to select the backup to restore
nBackups=$(ls tmp/backups/*_gitlab_backup.tar | wc -l)
nBackups=$(ls /home/git/data/backups/*_gitlab_backup.tar | wc -l)
if [ $nBackups -eq 0 ]; then
echo "No backup present. Cannot continue restore process.".
return 1
fi
for b in `ls tmp/backups/ | sort -r`
for b in `ls /home/git/data/backups/ | sort -r`
do
echo " ├ $b"
done
read -p "Select a backup to restore: " file
if [ ! -f "tmp/backups/${file}" ]; then
if [ ! -f "/home/git/data/backups/${file}" ]; then
echo "Specified backup does not exist. Aborting..."
return 1
fi