FUNCTION RESTORE
FUNCTION RESTORE serialized-value [FLUSH | APPEND | REPLACE]
- Available since:
- Redis Open Source 7.0.0
- Time complexity:
- O(N) where N is the number of functions on the payload
- ACL categories:
-
@write,@slow,@scripting, - Compatibility:
- Redis Software and Redis Cloud compatibility
Restore libraries from serialized payload.
You can use the optional policy argument to provide a policy for handling existing libraries.
For more information see Introduction to Redis Functions.
Required arguments
serialized-value
The payload produced by FUNCTION DUMP.
Optional arguments
FLUSH | APPEND | REPLACE
Policies for handling existing libraries:
APPEND:appends the restored libraries to the existing libraries and aborts on collision. This is the default policy.FLUSH:deletes all existing libraries before restoring the payload.REPLACE:appends the restored libraries to the existing libraries, replacing any existing ones in case of name collisions. Note that this policy doesn't prevent function name collisions, only libraries.
Redis Software and Redis Cloud compatibility
| Redis Software |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Standard |
✅ Standard |
Return information
Simple string reply:
OK.