Clearing Up Old Session Data
Please be aware that this functionality is available from v1.18.0.
Please ensure you take backups and/or examine the --dry-run output before deleting sessions.
Running the command
Connect to your server and run:
docker exec -ti backend node dist/scripts/session-clear-up.js
$ docker exec -ti backend node dist/scripts/session-clear-up.js --help
Options: --help Show help [boolean] --version Show version number [boolean] --dry-run [boolean] [default: false] --session-id Filter sessions by id [string] --user-id Filter sessions by user id [string] --months Find sessions older than <value> months [number] [default: 6] --output-type Output type, csv or json, default value is csv [string] [default: csv] --output-file Output file path, if you set a file path it will output to that file instead of stdout [string] --verbose, -v
info: Finding sessions older than 6 months (Wed Aug 14 2019 16:09:53 GMT+0000) info: Found 2 sessions to delete Are you sure you want to delete sessions? If you haven't taken a backup, please do so. Please type yes to confirm. Hint: Alternatively, use the --dry-run option to get an idea of what may be deleted >