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
Thanks for doing all the hard work on this one and posting it for all, it is very much appreciated.
First, I threw a simple pid file check in the script at the beginning for anyone who wants to use it. If the backup/send takes too long and the script runs again, it will cause issues. This is especially true on the first send when it does a full send.
PIDFILE=/var/run/zincrsend.pid
if [ -e $PIDFILE ]; then
echo "Zincrsend Already Running"
exit 1
fi
echo $$ > $PIDFILE
Then just an rm $PIDFILE at the end of the program. It's simple, but it got me when I was still doing a first send, and then my cron tried to start it again. It made a bit of a mess.
Second, I was using your snapshot-all program to give myself some weekly, monthly, and daily snapshots, and then ran the zincrsend every 4 hours to minimize the amount of time it takes to send. The issue is that the zincrsend script checks if the last backup exists, and sends the next one... but if the auto snapshot script makes another backup in the mean time, zincrsend doesn't know this... it only looks for the last one on the remote fs.
I'm thinking the best way to do this is to take the line that opens the remote fs and grep/sort/tails the name of the snapshots, and rather than just look at the last one, to recurse the entire list and compare all the snapshot on remote vs local. I'm going to attempt to do that, if someone else has a better idea throw it out there. Alternatively I was considering making the "snapshot_prefix" a command line argument and not using the auto snapshot at all... just run zincrsend for daily, weekly, monthly, and hourly. Not sure if that will work yet, haven't tried it.
Recursing through could also be a way to add the zfsstreamdump in that process to verify they're all still intact, though I'm not sure about that part yet... don't know if it'll take too much time or not.
Anyway, I'm going to continue playing, if others happen to notice things or have comments/suggestions, I'm all ears.
The text was updated successfully, but these errors were encountered:
Thanks for doing all the hard work on this one and posting it for all, it is very much appreciated.
First, I threw a simple pid file check in the script at the beginning for anyone who wants to use it. If the backup/send takes too long and the script runs again, it will cause issues. This is especially true on the first send when it does a full send.
PIDFILE=/var/run/zincrsend.pid
if [ -e $PIDFILE ]; then
echo "Zincrsend Already Running"
exit 1
fi
echo $$ > $PIDFILE
Then just an rm $PIDFILE at the end of the program. It's simple, but it got me when I was still doing a first send, and then my cron tried to start it again. It made a bit of a mess.
Second, I was using your snapshot-all program to give myself some weekly, monthly, and daily snapshots, and then ran the zincrsend every 4 hours to minimize the amount of time it takes to send. The issue is that the zincrsend script checks if the last backup exists, and sends the next one... but if the auto snapshot script makes another backup in the mean time, zincrsend doesn't know this... it only looks for the last one on the remote fs.
I'm thinking the best way to do this is to take the line that opens the remote fs and grep/sort/tails the name of the snapshots, and rather than just look at the last one, to recurse the entire list and compare all the snapshot on remote vs local. I'm going to attempt to do that, if someone else has a better idea throw it out there. Alternatively I was considering making the "snapshot_prefix" a command line argument and not using the auto snapshot at all... just run zincrsend for daily, weekly, monthly, and hourly. Not sure if that will work yet, haven't tried it.
Recursing through could also be a way to add the zfsstreamdump in that process to verify they're all still intact, though I'm not sure about that part yet... don't know if it'll take too much time or not.
Anyway, I'm going to continue playing, if others happen to notice things or have comments/suggestions, I'm all ears.
The text was updated successfully, but these errors were encountered: