ncp-restore: Add command for merging data directory with backup

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
Tobias K 2023-01-07 19:26:22 +01:00 committed by Tobias Knöppler
parent 71f8a2ef81
commit 72d35fbb99
No known key found for this signature in database
GPG Key ID: 3510056072886A8F

View File

@ -61,7 +61,7 @@ then
target="$NCDIR/data"
[[ -d "$target" ]] && {
target="$NCDIR/.data_$(date -I)"
echo "DATA CONFLICT! Your old '$NCDIR/data' directory can be found in '$target' after the restore script is done. The new '$NCDIR/data' directory will be restored from the backup."
echo "DATA CONFLICT! Your old '$NCDIR/data' directory can be found in '$target' after the restore script is done. The new '$NCDIR/data' directory will be restored from the backup. You can manually merge these directories with this command (run nc-fix-permissions and nc-scan afterwards): cp -rn '$target/'* '$target/'.[!.]* '$NCDIR/data/'"
}
echo "Restoring old '$NCDIR/data' to '$target'..."
mv -T "$DATA_BKP_DIR" "$target"