Skip to content

Commit

Permalink
nc-restore: dont destroy existing datadir
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Aug 10, 2017
1 parent 3dd9945 commit 390b313
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion etc/nextcloudpi-config.d/nc-restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ EOF
local DATADIR=$( grep datadirectory $BASEDIR/nextcloud/config/config.php | awk '{ print $3 }' | grep -oP "[^']*[^']" | head -1 )
[[ "$DATADIR" == "" ]] && { echo -e "Error reading data directory"; return 1; }
echo -e "restore datadir to $DATADIR..."
rm -rf "$DATADIR"
test -e "$DATADIR" && mv "$DATADIR" "$DATADIR-$( date "+%m-%d-%y" )"
mkdir -p "$( dirname "$DATADIR" )"
mv "$TMPDIR/$( basename "$DATADIR" )" "$DATADIR"
sudo -u www-data php occ maintenance:mode --off
Expand Down

0 comments on commit 390b313

Please sign in to comment.