modified: start.sh
Fixed unfreezew of filesystem
This commit is contained in:
parent
3c67c10242
commit
d5869c461b
6
start.sh
6
start.sh
@ -2,12 +2,12 @@
|
|||||||
##
|
##
|
||||||
## Script to automate the copy of databases running on a ramdisk to a permanent storage location
|
## Script to automate the copy of databases running on a ramdisk to a permanent storage location
|
||||||
##
|
##
|
||||||
echo -e 'Starting the sidecar container to periodically backup the sonarr databases'
|
echo -e 'Starting the sidecar container to periodically backup the databases'
|
||||||
echo -e 'Create the ramdisk file'
|
echo -e 'Create the ramdisk file'
|
||||||
dd if=/dev/zero of=/ramdisk/image.ext4 count=0 bs=1 seek=400M
|
dd if=/dev/zero of=/ramdisk/image.ext4 count=0 bs=1 seek=400M
|
||||||
echo -e 'Create filesystem on ramdisk file'
|
echo -e 'Create filesystem on ramdisk file'
|
||||||
mkfs.ext4 /ramdisk/image.ext4
|
mkfs.ext4 /ramdisk/image.ext4
|
||||||
echo -e 'Mount the ramdisk file to /mnt/sonarr-ramdisk-mount'
|
echo -e 'Mount the ramdisk file to /mnt/db-ramdisk-config'
|
||||||
mount /ramdisk/image.ext4 /mnt/db-ramdisk-config
|
mount /ramdisk/image.ext4 /mnt/db-ramdisk-config
|
||||||
echo -e 'Initial copy of the config from the remote share to the ramdisk'
|
echo -e 'Initial copy of the config from the remote share to the ramdisk'
|
||||||
cp -fvp /perm-config/*.* /mnt/db-ramdisk-config
|
cp -fvp /perm-config/*.* /mnt/db-ramdisk-config
|
||||||
@ -19,5 +19,5 @@ while true; do
|
|||||||
fsfreeze --freeze /mnt/db-ramdisk-config
|
fsfreeze --freeze /mnt/db-ramdisk-config
|
||||||
sleep 10
|
sleep 10
|
||||||
cp -fvp /mnt/db-ramdisk-config/*.* /perm-config/
|
cp -fvp /mnt/db-ramdisk-config/*.* /perm-config/
|
||||||
fsfreeze --unfreeze /mnt-ramdisk-config
|
fsfreeze --unfreeze /mnt/db-ramdisk-config
|
||||||
done
|
done
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user