-# 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
-# tar -cpf "${backupdir}/${fileNameBackupExternalDataDir}" -C "${nextcloudLocalExternalDataDir}" .
-#fi
+#
+if [ ! -z "${nextcloudLocalExternalDataDir+x}" ] ; then
+ echo "$(date +"%H:%M:%S"): Creating backup of Nextcloud local external storage directory..."
+
+ if [ "$useCompression" = true ] ; then
+ `$compressionCommand "${backupDir}/${fileNameBackupExternalDataDir}" -C "${nextcloudLocalExternalDataDir}" .`
+ else
+ tar -cpf "${backupDir}/${fileNameBackupExternalDataDir}" -C "${nextcloudLocalExternalDataDir}" .
+ fi