]> gitweb.hhaalo.de Git - simple-backup.git/commitdiff
change remove only top folder by unmount
authorBastian Dehn <hhaalo@arcor.de>
Sun, 25 May 2025 08:11:32 +0000 (10:11 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 25 May 2025 08:11:32 +0000 (10:11 +0200)
backupmount

index 0f3d31a154c31ca1bb5199f58b82e2e6cb7b17fd..88ec18b8202f65ad56a9d54a89633bef34da458d 100755 (executable)
@@ -102,14 +102,6 @@ mount_backup()
        errlog "no device was mounted"
 }
 
-remote_backup_dir()
-{
-       infolog "remove backup path $backup_path"
-       rmdir "$backup_path" \
-               || errlog "clound not remote $backup_path" \
-               || return $?
-}
-
 umount_backup()
 {
 
@@ -124,6 +116,11 @@ umount_backup()
                || errlog "could not unmount $backup_path" \
                || return $?
 
+       infolog "remove backup path $backup_path"
+       rmdir "$backup_path" \
+               || errlog "clound not remote $backup_path" \
+               || return $?
+
        local volume=$(cat "config.yaml" \
                | yq --raw-output ".backup_volume")
        [ "$volume" != "null" ] \