summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/bgrewriteaof.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2020-03-21 10:28:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 11:16:53 +0000
commit06cba6ccd165ca8b224797e37fccb9e63f026d77 (patch)
treee82f1bc439997ae296f2e74f8a64d84c5d95f140 /iredis/data/commands/bgrewriteaof.md
parentInitial commit. (diff)
downloadiredis-06cba6ccd165ca8b224797e37fccb9e63f026d77.tar.xz
iredis-06cba6ccd165ca8b224797e37fccb9e63f026d77.zip
Adding upstream version 1.9.1.upstream/1.9.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'iredis/data/commands/bgrewriteaof.md')
-rw-r--r--iredis/data/commands/bgrewriteaof.md37
1 files changed, 37 insertions, 0 deletions
diff --git a/iredis/data/commands/bgrewriteaof.md b/iredis/data/commands/bgrewriteaof.md
new file mode 100644
index 0000000..2ebaa89
--- /dev/null
+++ b/iredis/data/commands/bgrewriteaof.md
@@ -0,0 +1,37 @@
+Instruct Redis to start an [Append Only File][tpaof] rewrite process. The
+rewrite will create a small optimized version of the current Append Only File.
+
+[tpaof]: /topics/persistence#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 positive
+ status reply, but with an appropriate message. You can check if an AOF rewrite
+ is scheduled looking at the `INFO` command as of Redis 2.6 or successive
+ versions.
+- If an AOF rewrite is already in progress the command returns an error and no
+ AOF rewrite will be scheduled for a later time.
+- If the AOF rewrite could start, but the attempt at starting it fails (for
+ instance because of an error in creating the child process), an error is
+ returned to the caller.
+
+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][tp] for detailed information.
+
+[tp]: /topics/persistence
+
+@return
+
+@simple-string-reply: A simple string reply indicating that the rewriting
+started or is about to start ASAP, when the call is executed with success.
+
+The command may reply with an error in certain cases, as documented above.