diff options
author | Tanarri <Tanarri@users.noreply.github.com> | 2019-03-12 02:45:02 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2019-03-12 02:44:46 +0300 |
commit | 6a01f89b023c7ea13aeaa77e893c964e45ef6959 (patch) | |
tree | 0bb01d2bd1c4dfe53b687190cb3b0bab58de271c | |
parent | 803287e1e55a5d1cc0c86d42c34369d7bce456ed (diff) |
nc-datadir: Inform the user about the current step (#835)
-rw-r--r-- | bin/ncp/BACKUPS/nc-restore.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ncp/BACKUPS/nc-restore.sh b/bin/ncp/BACKUPS/nc-restore.sh index 5807cdcf..df474120 100644 --- a/bin/ncp/BACKUPS/nc-restore.sh +++ b/bin/ncp/BACKUPS/nc-restore.sh @@ -92,13 +92,13 @@ if [[ $( ls "$TMPDIR" | wc -l ) -eq $NUMFILES ]]; then DATADIR=$( grep datadirectory "$NCDIR"/config/config.php | awk '{ print $3 }' | grep -oP "[^']*[^']" | head -1 ) [[ "$DATADIR" == "" ]] && { echo "Error reading data directory"; exit 1; } - echo "restore datadir to $DATADIR..." - [[ -e "$DATADIR" ]] && { echo "backing up existing $DATADIR to $DATADIR-$( date "+%m-%d-%y" )..." mv "$DATADIR" "$DATADIR-$( date "+%m-%d-%y" )" || exit 1 } + echo "restore datadir to $DATADIR..." + mkdir -p "$DATADIR" [[ "$( stat -fc%T "$DATADIR" )" == "btrfs" ]] && { rmdir "$DATADIR" || exit 1 |