Redis Bgrewriteaof Command
--
- Home
- HTML
- JavaScript
- CSS
- Vue
- React
- Python3
- Java
- C
- C++
- C#
- AI
- Go
- SQL
- Linux
- VS Code
- Bootstrap
- Git
- Local Bookmark
Redis Tutorial
Redis Tutorial
Redis Introduction
Redis Installation
Redis Configuration
Redis Data Types
Redis Commands
Redis Commands
Redis Keys
Redis Strings
Redis Hashes
Redis Lists
Redis Sets
Redis Sorted Sets
Redis HyperLogLog
Redis Pub/Sub
Redis Transactions
Redis Scripting
Redis Connection
Redis Server
Redis GEO
Redis Stream
Redis Advanced Tutorial
Redis Backup and Recovery
Redis Security
Redis Performance Testing
Redis Client Connection
Redis Pipelining
Redis Partitioning
Java Using Redis
PHP Using Redis
Redis Server
Redis Bgsave Command
Redis Bgrewriteaof Command
Redis Server
The Redis BGREWRITEAOF command is used to asynchronously execute an AOF (Append Only File) file rewrite operation. The rewrite will create an optimized version of the current AOF file in terms of size.
Even if BGREWRITEAOF fails, no data will be lost because the old AOF file will not be modified until BGREWRITEAOF succeeds.
Note: Starting from Redis 2.4, AOF rewriting is triggered automatically by Redis, and BGREWRITEAOF is only used to manually trigger the rewrite operation.
Syntax
The basic syntax of the redis BGREWRITEAOF command is as follows:
redis 127.0.0.1:6379> BGREWRITEAOF
Available Versions
>= 1.0.0
Return Value
Feedback information.
Example
redis 127.0.0.1:6379> Background append only file rewriting started
YouTip