Skip to content

Instantly share code, notes, and snippets.

@arnaud-lb
Created July 13, 2012 16:19
Show Gist options
  • Save arnaud-lb/3105762 to your computer and use it in GitHub Desktop.
Save arnaud-lb/3105762 to your computer and use it in GitHub Desktop.
backuprotate
/var/lib/redis/dump.rdb {
# rotate every day and keep 30 backups
daily
rotate 30
missingok
# rename backups dump.rdb-YYYYMMDD
# instead of dump.rdb.X: more rsync friendly
dateext
# create a new dump
postrotate
redis-cli bgsave
endscript
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment