Example client to use the session rotation API
[lttng-tools.git] / doc / examples / rotation / rotate-client-compress.sh
CommitLineData
7779bc96
JD
1#!/bin/bash
2
3# Receive the path of a chunk of trace, compress it to a temporary directory
4# and delete the chunk.
5
6TRACE_PATH="$1"
7TRACE_NAME="$(basename "$TRACE_PATH")"
8OUT_PATH="$(mktemp -d)"
9
10cd "$TRACE_PATH/.."
11
12tar czf ${OUT_PATH}/${TRACE_NAME}.tar.gz $TRACE_NAME
13echo "New trace chunk archive compressed to ${OUT_PATH}/${TRACE_NAME}.tar.gz"
14rm -rf "$TRACE_PATH"
This page took 0.023068 seconds and 4 git commands to generate.