Migrating to AOF

9 views
Skip to first unread message

Luke Melia

unread,
Jan 24, 2010, 8:53:05 AM1/24/10
to redi...@googlegroups.com
What are the steps to migrating a redis instance from using a dump
file to using the Append Only File type of persistence?

Cheers,
Luke
--
Luke Melia
lu...@lukemelia.com
http://www.lukemelia.com/

Salvatore Sanfilippo

unread,
Jan 24, 2010, 10:31:05 AM1/24/10
to redi...@googlegroups.com
On Sun, Jan 24, 2010 at 2:53 PM, Luke Melia <lu...@lukemelia.com> wrote:
> What are the steps to migrating a redis instance from using a dump file to
> using the Append Only File type of persistence?

Good question Luke, with an easy answer fortunately:

1) Create the initial append only file from your dataset just issuing:
redis-cli bgrewriteaof
2) When the rewrite is done (you can see it from the INFO command
output) stop the server
3) Edit redis.conf in order to enable append only
4) Restart the server
5) Profit!

Because AOF is new you may want to dump your DB the old way from time
to time and backup it, it's trivial as when AOF is enabled you can
still issue BGSAVE or SAVE.

Cheers,
Salvatore


--
Salvatore 'antirez' Sanfilippo
http://invece.org

"Once you have something that grows faster than education grows,
you’re always going to get a pop culture.", Alan Kay

Reply all
Reply to author
Forward
0 new messages