Cleaning up old bundles
HST server has a background process which periodically deletes bundles older than 30 days. Additionally, bundle "purge" commands can be used to trigger this process for purging bundles older than specified number of days or for purging a particular bundle. There are two ways to purge bundles:
Purge: The bundle file is removed from the storage but associated records such as recommendations from the HST DB are retained.
Hard purge: All bundle data and its associated records such as recommendations from the HST DB are completely removed.
When using hst purge, soft purging is used unless the hard purging option is specified.
# hst purge -h Usage: hst purge [-r][-b][-H][-q] arg Triggers bundle purge job Options: -h, --help show this help message and exit -r RETENTIONDAYS, --retentionDays=RETENTIONDAYS number of days to retain a bundle before purging -H, --hard flag to indicate hard purge -b BUNDLEID, --bundleId=BUNDLEID purge a particular bundle Id -q, --quiet flag to purge quietly
1. Purge bundles older than 5 days:
# hst purge -r 5 Do you want to continue purging bundles older than 5 days ? y/n (default: n): y Bundles purge job triggered successfully.2. Hard purge bundles older than 20 days:
# hst purge -r 20 -H Do you want to continue hard purging bundles older than 20 days ? y/n (default: n): y Bundles purge job triggered successfully.
3. Manually trigger default purge process:
# hst purge Do you want to continue purging bundles older than 30 days ? y/n (default: n): n4. Hard purge a particular bundle:
# hst purge -b a-xxxxxxxx-c-xxxxxxxx_c6nr_0_2017-05-07_02-00-02 -H Do you want to continue hard purging bundle : a-xxxxxxxx-c-xxxxxxxx_c6nr_0_2017-05-07_02-00-02 ? y/n (default: n): y Bundle purged successfully.
5. Purge a particular bundle:
# hst purge -b a-xxxxxxxx-c-xxxxxxxx_c6nr_0_2017-05-05_08-32-09 Do you want to continue purging bundle : a-xxxxxxxx-c-xxxxxxxx_c6nr_0_2017-05-05_08-32-09 ? y/n (default: n): y Bundle purged successfully.