Haven: unlock and mount /backups partition
This commit is contained in:
parent
655d909416
commit
cfe1d8d4df
14
flake.lock
14
flake.lock
|
@ -218,8 +218,6 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715442723,
|
|
||||||
"narHash": "sha256-pXMH7lqr5bT2FjH/3tEdTT/+1+hKx+15WkcGKycWWSM=",
|
|
||||||
"lastModified": 1715442723,
|
"lastModified": 1715442723,
|
||||||
"narHash": "sha256-pXMH7lqr5bT2FjH/3tEdTT/+1+hKx+15WkcGKycWWSM=",
|
"narHash": "sha256-pXMH7lqr5bT2FjH/3tEdTT/+1+hKx+15WkcGKycWWSM=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
|
@ -251,11 +249,11 @@
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715528918,
|
"lastModified": 1715529644,
|
||||||
"narHash": "sha256-VvRyabLoTbX69HRiSmgraHqPzz+cfjMJjYxSmBPz0vg=",
|
"narHash": "sha256-5zLGr8IDwzVuA6FhpaacAP0MxsUFUbABpF6ZTnJ/KXg=",
|
||||||
"owner": "8bitbuddhist",
|
"owner": "8bitbuddhist",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "2e28b5160b3fb8a1950a45f65e66fcca06920ac0",
|
"rev": "a1dc5cd106dd23416447f5776415c00b2581102e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -299,11 +297,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715447595,
|
"lastModified": 1715534503,
|
||||||
"narHash": "sha256-VsVAUQOj/cS1LCOmMjAGeRksXIAdPnFIjCQ0XLkCsT0=",
|
"narHash": "sha256-5ZSVkFadZbFP1THataCaSf0JH2cAH3S29hU9rrxTEqk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "062ca2a9370a27a35c524dc82d540e6e9824b652",
|
"rev": "2057814051972fa1453ddfb0d98badbea9b83c06",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -10,11 +10,7 @@ fi
|
||||||
# Immediately exit on any errors
|
# Immediately exit on any errors
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# local storage partition
|
|
||||||
echo "Unlocking storage partition:"
|
echo "Unlocking storage partition:"
|
||||||
# 4 TB HDD, partition #2
|
|
||||||
#cryptsetup luksOpen /dev/disk/by-uuid/8dc60329-d27c-4a4a-b76a-861b1e28400e storage
|
|
||||||
|
|
||||||
# RAID 5
|
# RAID 5
|
||||||
cryptsetup luksOpen /dev/md/Sapana storage
|
cryptsetup luksOpen /dev/md/Sapana storage
|
||||||
|
|
||||||
|
@ -23,6 +19,11 @@ if [ ! -f /dev/mapper/storage ]; then
|
||||||
mount /dev/mapper/storage /storage
|
mount /dev/mapper/storage /storage
|
||||||
|
|
||||||
if [ $? -eq "0" ]; then
|
if [ $? -eq "0" ]; then
|
||||||
|
echo "Unlocking backup partition:"
|
||||||
|
# 4 TB HDD, partition #2
|
||||||
|
cryptsetup luksOpen /dev/disk/by-uuid/8dc60329-d27c-4a4a-b76a-861b1e28400e backups --key-file /storage/backups_partition.key
|
||||||
|
mount /dev/mapper/backups /backups
|
||||||
|
|
||||||
echo "Storage and backup partitions mounted."
|
echo "Storage and backup partitions mounted."
|
||||||
|
|
||||||
echo "Starting Duplicacy:"
|
echo "Starting Duplicacy:"
|
||||||
|
|
Loading…
Reference in a new issue