Wavey Posted August 20, 2020 Share Posted August 20, 2020 Question: So want to write a script that runs at the stopping of Array that copies a file I keep in the /tmp folder over to cache then move it back at start of the array. I am just moving a folder with 3-4gb database+blob from tmp to cache then back at the stopping and starting of the array for a docker and want to know if it would give me enough time to do that. Why: I'm doing this because I'm testing putting my plex database in /tmp to run it on ram. The problem is I don't want to lose it at shutdown so I figured I'd run a copy script that moved it at array shutdown and then moved it back at start up and put a delay on my plex docker starting. This is a testing situation because I am getting busy db errors. Before we dive into this and people tell me how to fix that, trust me I've tried, trust me. Its currently running on an NVME, still busy, ran multiple optimize, dumps etc...nothing works and apparently its the fact that the DB is so big (2.2GB) and sqlite3 isn't the best for it. It's been years of me trying to stop it and I ran across a few people who dropped it into ram and it solved their problem so I'm trying to do the same. I'm also aware that if its a dirty shutdown I'll lose it but its backed up every 3 days so I wouldn't lose much. Quote Link to comment
hawihoney Posted August 20, 2020 Share Posted August 20, 2020 cp or mv? I ask because I copy (cp) the Plex database (1.1GB) all the time. Never seen a message like that. Quote Link to comment
testdasi Posted August 20, 2020 Share Posted August 20, 2020 You can try using the User Scripts plugin. It has option to schedule script at array stop. 2.2GB db is not big. My db is 23GB and I don't have that busy db errors so perhaps something else is going on? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.