You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hope you don't mind me asking another question..
Before using your script, my sync & cleanup commands were part of a nightly cleanup bash script, run via cron (non-root). It contained this:
# Create a temp file to indicate maintenance is running
touch /tmp/maintenance-is-running
(perform actions)
# Delete temp file, follow up tasks can continue
rm /tmp/maintenance-is-running
This way, my next nightly scheduled cronjob (bash script creating backups, requires root) runs about an hour later via root cron, but waits for that temporary file to be deleted. This way, I made sure snapraid was finished before performing other disk intensive duties:
# Make sure maintenance is finished before performing backups via btrbk
while [[ -f /tmp/maintenance-is-running ]] ; do
sleep 10 ;
done
Now it seems silly to use a bash script to run your script, but now my root backup script can no longer detect if snapraid is running. Is there a way for me to simply figure out if your script is finished, before performing other tasks?
The text was updated successfully, but these errors were encountered:
Now it seems silly to use a bash script to run your script
I don't think that's silly at all. This script doesn't have a lock file or anything so if you need create that /tmp/maintenance-is-running, I think running a small wrapper script around snapraid-btrfs-runner is still elegant.
but now my root backup script can no longer detect if snapraid is running
How is it detecting it? Ultimately, snapraid-btrfs-runner calls snapraid-btrfs which calls snapraid to do the actual parity sync and scrub actions. It should look like native snapraid to any script looking for that process.
Hope you don't mind me asking another question..
Before using your script, my sync & cleanup commands were part of a nightly cleanup bash script, run via cron (non-root). It contained this:
This way, my next nightly scheduled cronjob (bash script creating backups, requires root) runs about an hour later via root cron, but waits for that temporary file to be deleted. This way, I made sure snapraid was finished before performing other disk intensive duties:
Now it seems silly to use a bash script to run your script, but now my root backup script can no longer detect if snapraid is running. Is there a way for me to simply figure out if your script is finished, before performing other tasks?
The text was updated successfully, but these errors were encountered: