X-Git-Url: https://git.p6c8.net/nextcloud-backup-restore.git/blobdiff_plain/3ba26cfe9a8d11e874cd2a9c2e042fc9bc4dd2aa..371fa270c89ef7cb2929578394ea28c70cd9ff05:/NextcloudBackup.sh diff --git a/NextcloudBackup.sh b/NextcloudBackup.sh index 0b03af1..5606883 100644 --- a/NextcloudBackup.sh +++ b/NextcloudBackup.sh @@ -24,6 +24,8 @@ backupMainDir=$1 if [ -z "$backupMainDir" ]; then # TODO: The directory where you store the Nextcloud backups (when not specified by args) backupMainDir='/media/hdd/nextcloud_backup' +else + backupMainDir=$(echo $backupMainDir | sed 's:/*$::') fi currentDate=$(date +"%Y%m%d_%H%M%S") @@ -206,6 +208,7 @@ echo # Backup local external storage. # Uncomment if you use local external storage #echo "Creating backup of Nextcloud local external storage directory..." + #if [ "$useCompression" = true ] ; then # tar -cpzf "${backupdir}/${fileNameBackupExternalDataDir}" -C "${nextcloudLocalExternalDataDir}" . #else