The Megh Portal is provided with two types of options for purging unwanted objects of the Minio to optimise the storage i.e
- Manual Purge
- Auto Purge
1. Manual Purge - by clear storage option
The users can manually purge the unwanted objects in minio using clear storage option provided in the site and site/id page.
In the site/id page the clear storage option is provided above the mapview of the site beside the add device button as shown below.
This button can be used to do clear storage for selected site in which the user is currently present in.
In the site page the clear storage option is provided beside add site button, above the customer details card on the top as shown below.
This button can be used to do clear storage for all sites associated with the customer.
The user can click on clear storage button which opens up a popup as shown below.
Here all the devices under each of the site and respective channels under each device are listed in the tree hierarchy format.
The user can select the respective channel and click on submit to initiate the clear storage process. This process takes some time and if there are any active alert(s) they will be de-activated and re-activated once the storage is cleared.
If there are any scheduled alert during the clear storage process they will be deactivated and removed. Only the schedules which have alerts scheduled after the time of clear storage process will be activated as per the schedule.
The user can see the storage purge is in progress tag above the alert card in channel-alert page as shown in above image and also in channelpage below event history timeline graph as shown in below image which indicates the user that the alert is deactivated due to clear storage process.
2. Auto Purge
Auto purge feature is the automatic purging of storage based on the purge_threshold key set by the user in the storage section of sts/config.yaml file.
# storage - [REQUIRED] image/video storage module.
By default the purge_threshold key is set to 80. When this key is set to 80 it means that the autopurge process starts when the user's disk space is 80% or above.
This process purges the objects in the minIO buckets, it does this in descending order of the size of minIO buckets i.e it first deletes the objects of the bucket which has maximum size and similarly in order takes each bucket, looks for the oldest objects and purges 20% of the objects in each of the buckets.