BGREWRITEAOF
相关命令
- BGREWRITEAOF
- BGSAVE
- CLIENT GETNAME
- CLIENT KILL
- CLIENT LIST
- CLIENT PAUSE
- CLIENT SETNAME
- CLUSTER SLOTS
- COMMAND
- COMMAND COUNT
- COMMAND GETKEYS
- COMMAND INFO
- CONFIG GET
- CONFIG RESETSTAT
- CONFIG REWRITE
- CONFIG SET
- DBSIZE
- DEBUG OBJECT
- DEBUG SEGFAULT
- FLUSHALL
- FLUSHDB
- INFO
- LASTSAVE
- MONITOR
- ROLE
- SAVE
- SHUTDOWN
- SLAVEOF
- SLOWLOG
- SYNC
- TIME
始于1.0.0可用。
Instruct Redis to start an Append Only File rewrite process. The rewrite will create a small optimized version of the current Append Only File.
If BGREWRITEAOF fails, no data gets lost as the old AOF will be untouched.
The rewrite will be only triggered by Redis if there is not already a background process doing persistence. Specifically:
- If a Redis child is creating a snapshot on disk, the AOF rewrite is scheduled but not started until the saving child producing the RDB file terminates. In this case the BGREWRITEAOF will still return an OK code, but with an appropriate message. You can check if an AOF rewrite is scheduled looking at the INFO command as of Redis 2.6.
- If an AOF rewrite is already in progress the command returns an error and no AOF rewrite will be scheduled for a later time.
Since Redis 2.4 the AOF rewrite is automatically triggered by Redis, however the BGREWRITEAOF command can be used to trigger a rewrite at any time.
Please refer to the persistence documentation for detailed information.
返回值
Simple string reply: always OK
.
This website is open source software developed by Citrusbyte.
The Redis logo was designed by Carlos Prioglio. See more credits.