cells-enterprise admin clean activities

./cells-enterprise admin clean activities

Purge user or file activities based on various criteria



Launch a dedicated job to purge activities. The server must be running when launching this command.

Activities are "social" events displayed in the interface. They can be either attached to "users" (notifications feed) or "nodes" (files/folders activities shown in the right panel when selecting a node).

As they can grow indefinitely, this command can help for housekeeping and maintaining the activities database small.


Purge users notifications, keeping at least 5 and maximum 20 items per user:

$ ./cells-enterprise admin clean activities --type users --box inbox -a admin --min 5 --max 20

./cells-enterprise admin clean activities [flags]


  -a, --admin string     Provide login of the administrator user
  -b, --box string       Either inbox (notifications received) or outbox (user activity / file activity) (default "outbox")
      --clear            After DB compaction, remove original file, otherwise keep it as a backup
      --compact          Trigger DB compaction by copying boltDB into a new file (default true)
      --db string        Point directly to a DB file to perform the purge offline
  -h, --help             help for activities
      --max int          Clear by keeping a maximum number of records inside each box
      --min int          Keep at least N, 0 for clearing all records (default 1)
  -o, --owner string     Specific user or node ID, or all (default "*")
      --timeout string   Set a longer timeout if there are tons of activities to purge (duration) (default "6h")
  -t, --type string      Activity type, one of 'nodes' or 'users' (default "nodes")
      --updated string   Clear by keeping all records updated before a given date. Use golang duration, e.g. '3d' will keep all records updated in the last 3 days and remove older entries.

Options inherited from parent commands

      --broker string                           Pub/sub service for events between services (currently nats only) (default "memory")
      --nats_address string                     NATS server address (default ":4222")
      --nats_cluster_address string             NATS server cluster address
      --nats_cluster_routes string              NATS server cluster routes
      --nats_monitor_port int                   Expose nats monitoring endpoints on a given port (default 8222)
      --nats_streaming_cluster_bootstrap        NATS streaming bootstrap cluster
      --nats_streaming_cluster_id string        NATS streaming cluster ID (default "cells")
      --nats_streaming_cluster_node_id string   NATS streaming cluster node id
      --nats_streaming_cluster_peers string     NATS streaming list of cluster peers
      --nats_streaming_clustered                NATS streaming clustered
      --nats_streaming_store string             NATS streaming store type (default "MEMORY")
      --port_broker int                         Port used to start a broker discovery service (default 8003)
      --port_registry int                       Port used to start a registry discovery service (default 8000)
      --registry string                         Registry used to manage services (currently nats only) (default "memory")
      --transport string                        Transport protocol for RPC (default "grpc")


Auto generated by Pydio Cells Enterprise Distribution v3.0.2 on 11-Nov-2021
Back to top