bitwarden / self-host

Bitwarden's self-hosted release repository
GNU General Public License v3.0
331 stars 60 forks source link

Add compressLogs Functionality to Bitwarden Self-Hosted (Bash) #225

Closed fer closed 6 months ago

fer commented 7 months ago

Description

Introduces a new feature to the Bitwarden self-hosted script bitwarden.sh – the ability to compress and archive logs within a specified date range, or all logs if no range is provided.

This enhancement simplifies log management, particularly for troubleshooting and audit purposes, by allowing administrators to easily package relevant log files.

Features

Usage examples

Compress logs from March 4th, 2024 to March 5th, 2024:

./bitwarden.sh compresslogs 20240304 20240305

A compressed file bitwarden-logs-20240304-to-20240305.tar.gz is produced.

Compress all logs:

./bitwarden.sh compresslogs

A compress file bitwarden-logs-all.tar.gz is produced

Testing

Please review this PR for inclusion in the next release of Bitwarden self-hosted. Your feedback and suggestions are welcome!

bitwarden-bot commented 7 months ago

Logo Checkmarx One – Scan Summary & Detailsa2d46317-99cb-440f-bfcd-ab20a0b04e64

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Unpinned Actions Full Length Commit SHA /build-unified.yml: 194 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...

Fixed Issues

Severity Issue Source File / Package
MEDIUM Unpinned Actions Full Length Commit SHA /build-unified.yml: 190