是否可以回滚到 jcr 中的时间戳?

Is it possible to rollback to a timestamp in the jcr?

我想知道 JCR 中是否有某些东西允许您拍摄 JCR 实例的时间戳快照,以便您可以将整个工作区回滚到特定时间。

这背后的驱动因素是当你进行代码部署时,它允许你回滚到部署前的状态,因为使用包只允许你前滚。

JCR 下是持久性管理器:

Persistence Manager: The persistence manager handles storage of the node/property tree that makes up the structure of the repository. This includes the name and position of each node and property in the hierarchy as well as the actual values of the smaller properties (the data store takes care of storing the larger values, see below). The default persistence manager is TarPersistenceManager. By default, it stores its data at crx-quickstart/repository/workspaces/crx.default/.

如果您使用默认的 Tar 持久性管理器,它使用 'journals':

的概念

The journal helps maintains data consistency and helps the system to recover quickly from crashes. In a clustered environment the journal plays the critical role of synchronizing content across cluster instances.

两者一起,允许您将持久存储回滚到相对时间(“1 小时前”、实际时间(“下午 3 点”)或事务 ID。

请参阅 documentation here 了解如何执行此操作。需要注意的重要事项 - 您只能回滚到上次 Tar 优化 运行(通常是 运行 一夜之间的操作)。