redis: backing up dump.rdb

后端 未结 2 1582
挽巷
挽巷 2021-02-03 21:13

Context

I have a live running redis-server.

I want to make a backup.

Idea:

I want to do the following:

cp dump.rdb ~/some-oth         


        
2条回答
  •  花落未央
    2021-02-03 21:44

    From http://redis.io/topics/persistence

    Redis is very data backup friendly since you can copy RDB files while the database is running: the RDB is never modified once produced, and while it gets produced it uses a temporary name and is renamed into its final destination atomically using rename(2) only when the new snapshot is complete.

    So, the correct way is to simply copy the dump.rdb to your backup location.

提交回复
热议问题