How to backup .aof file ?

284 views
Skip to first unread message

Favo Yang

unread,
Oct 2, 2010, 11:34:07 AM10/2/10
to Redis DB
Is that safe to just cp .aof file for backup ?

Konstantin Merenkov

unread,
Oct 2, 2010, 4:12:27 PM10/2/10
to redi...@googlegroups.com
It should be safe to do so. It will be consistent. We tried to cp aof
under load and try to start redis from every aof copy, worked fine,
never broke.
I hope that it will be confirm by someone else because, well, I just
figured it out myself.

On Sat, Oct 2, 2010 at 7:34 PM, Favo Yang <favo...@gmail.com> wrote:
> Is that safe to just cp .aof file for backup ?
>

> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
>
>

--
Best Regards,
Konstantin Merenkov

Salvatore Sanfilippo

unread,
Oct 2, 2010, 5:14:10 PM10/2/10
to redi...@googlegroups.com
On Sat, Oct 2, 2010 at 10:12 PM, Konstantin Merenkov
<kmer...@gmail.com> wrote:
> It should be safe to do so. It will be consistent. We tried to cp aof
> under load and try to start redis from every aof copy, worked fine,
> never broke.
> I hope that it will be confirm by someone else because, well, I just
> figured it out myself.

Hello, it is indeed safe.

At max what may happen is that the resulting file contains non well
finished data, but to fix it all it's needed is to run redis-check-aof
--fix if Redis will complain on reload.

Cheers,
Salvatore

> On Sat, Oct 2, 2010 at 7:34 PM, Favo Yang <favo...@gmail.com> wrote:
>> Is that safe to just cp .aof file for backup ?
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Redis DB" group.
>> To post to this group, send email to redi...@googlegroups.com.
>> To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
>> For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
>>
>>
>
>
>
> --
> Best Regards,
> Konstantin Merenkov
>
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
>
>

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

"We are what we repeatedly do. Excellence, therefore, is not an act,
but a habit." -- Aristotele

Favo Yang

unread,
Oct 3, 2010, 3:50:41 AM10/3/10
to Redis DB
On Oct 3, 5:14 am, Salvatore Sanfilippo <anti...@gmail.com> wrote:
> Hello, it is indeed safe.
>
> At max what may happen is that the resulting file contains non well
> finished data, but to fix it all it's needed is to run redis-check-aof
> --fix if Redis will complain on reload.

Then it's better either add a dump_aof command or add
BgrewriteaofCommand a parameter don't delete the old file, we can
trust the old file as an aof dump.
Reply all
Reply to author
Forward
0 new messages