Offload To File

Description

Archiving logs from one or more source collections to files by chunks of days.

Command

codefresh offline-logs offload-to-file

Options

Option Alias Type Default Description
–uri string Mongodb URI. If not provided, will be parsed from environment variable RUNTIME_MONGO_URI.
–db string Database name. If not provided, will be parsed from environment variable RUNTIME_MONGO_DB.
–help Print help information
–chunkDuration –chdur number 1 Chunk size in days, each chunk will be archived into a different file.
–cutoffDate –cod string The date in ISO format (yyyy-MM-dd) from which logs will be archived (going backwards, including logs from that day).
–path string . Directory path to which archive files will be saved.
–collections -c string logs,metadata Source collections names

Examples

undefined

codefresh offline-logs offload-to-file --uri "mongodb://192.168.99.100:27017" --db logs --collections archive-logs --cod "2021-07-08" --chdur 3 --path "./"