Skip to content

Instantly share code, notes, and snippets.

@dmulter
Created January 5, 2015 23:17
Show Gist options
  • Save dmulter/6b7f3993d87155db73cc to your computer and use it in GitHub Desktop.
Save dmulter/6b7f3993d87155db73cc to your computer and use it in GitHub Desktop.
blocking redis bgsave
#!/bin/sh
# background save Redis data
lsave=`redis-cli lastsave`
redis-cli bgsave
while [ $lsave -eq `redis-cli lastsave` ]; do
sleep 5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment