LASTSAVE
Since 1.1.0ServerChanged in 1.2.1
Syntax
LASTSAVEHistory
- 1.2.1: acl categories: removed server
Returns the Unix time of the last snapshot saved, 0 if none.
It moves with every save of the whole dataset: SAVE, BGSAVE once it has finished, the save at shutdown, a rewrite of the append-only file (BGREWRITEAOF, an automatic rewrite, CONFIG SET appendonly yes), and a replica's copy of its master's dataset. When the server starts, it is the time the server started, as in Redis. INFO persistence gives the same time as rdb_last_save_time.
Before 1.2, it was 0 after a restart, and only SAVE and BGSAVE moved it.
Examples
> LASTSAVE
(integer) 1793114399