Revisions Cleanup
The revisions command allows removing the revisions of files in the storage.
ocis revisions purge [--dry-run=false] -p /base/path/storage/users
It takes the --resource-id (or --r) parameter which specifies the scope of the command:
-
An empty string (default) removes all revisions from all spaces.
-
A spaceID (like
d419032c-65b9-4f4e-b1e4-0c69a946181d\$44b5a63b-540c-4002-a674-0e9c833bbe49) removes all revisions in that space. -
A resourceID (e.g.
d419032c-65b9-4f4e-b1e4-0c69a946181d\$44b5a63b-540c-4002-a674-0e9c833bbe49\!e8a73d49-2e00-4322-9f34-9d7f178577b2) removes all revisions from that specific file.
This command provides additional options:
-
--dry-run(default:true)
Do not remove any revisions but print the revisions that would be removed. Note: This is a safety measure so you don’t delete your revisions accidentally. You must specify--dry-run=falsefor the purge to be effective. -
-b/--blobstore
Allows specifying the blobstore to use. Defaults toocis. Can be switched tos3ngbut needs addtional envvar configuration (see thestorage-usersservice for more details). -
-v/--verbose
Prints additional information about the revisions that are removed. -
--glob-mechanism(default:glob
(advanced) Allows specifying the mechanism to use for globbing. Can beglob,listorworkers. In most cases the defaultglobdoes not need to be changed. If large spaces need to be purged,listorworkerscan be used to improve performance at the cost of higher cpu and ram usage.listwill spawn 10 threads that list folder contents in parallel.workerswill use a special globbing mechanism and multiple threads to achieve the best performance for the highest cost.