| 1 | lttng-save(1) |
| 2 | ============= |
| 3 | :revdate: 3 May 2021 |
| 4 | |
| 5 | |
| 6 | NAME |
| 7 | ---- |
| 8 | lttng-save - Save LTTng tracing session configurations |
| 9 | |
| 10 | |
| 11 | SYNOPSIS |
| 12 | -------- |
| 13 | [verse] |
| 14 | *lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *save* [option:--force] [option:--output-path='DIR'] ['SESSION'] |
| 15 | |
| 16 | |
| 17 | DESCRIPTION |
| 18 | ----------- |
| 19 | The `lttng save` command saves to files the configurations of: |
| 20 | |
| 21 | With the 'SESSION' argument:: |
| 22 | The tracing session named 'SESSION'. |
| 23 | |
| 24 | Without the 'SESSION' argument:: |
| 25 | *All* the tracing sessions of the connected session daemon for your |
| 26 | Unix user, or for all users if your Unix user is `root`, as listed |
| 27 | in the output of `lttng list` (see man:lttng-list(1)). |
| 28 | + |
| 29 | See the ``Session daemon connection'' section of man:lttng(1) to learn |
| 30 | how a user application connects to a session daemon. |
| 31 | |
| 32 | See man:lttng-concepts(7) to learn more about tracing sessions. |
| 33 | |
| 34 | Use the `save` command in conjunction with the man:lttng-load(1) command |
| 35 | to save and restore the complete configurations of tracing sessions. |
| 36 | |
| 37 | The `save` command does :not: save tracing data, only the tracing |
| 38 | session parameters, including the channel and recording event rule |
| 39 | configurations. |
| 40 | |
| 41 | The default output directory path is `$LTTNG_HOME/.lttng/sessions` |
| 42 | (`$LTTNG_HOME` defaults to `$HOME`). Override the default output |
| 43 | directory path with the option:--output-path option. Each tracing |
| 44 | session configuration file is named __SNAME__++.lttng++, |
| 45 | where{nbsp}__SNAME__ is the original tracing session name. |
| 46 | |
| 47 | By default, the `save` command does :not: overwrite existing tracing |
| 48 | session configuration files: the command fails. Allow the `save` command |
| 49 | to overwrite existing tracing session configuration files with the |
| 50 | option:--force option. |
| 51 | |
| 52 | |
| 53 | include::common-lttng-cmd-options-head.txt[] |
| 54 | |
| 55 | |
| 56 | option:-a, option:--all:: |
| 57 | Save all the tracing session configurations of your Unix user, or of |
| 58 | all users if your Unix user is `root`, as listed in the output of |
| 59 | man:lttng-list(1), instead of the current tracing session or the |
| 60 | tracing session named 'SESSION'. |
| 61 | |
| 62 | option:-f, option:--force:: |
| 63 | Overwrite existing tracing session configuration files when |
| 64 | saving. |
| 65 | |
| 66 | option:-o 'DIR', option:--output-path='DIR':: |
| 67 | Save tracing session configuration files to the directory 'DIR' |
| 68 | instead of `$LTTNG_HOME/.lttng/sessions` (`$LTTNG_HOME` defaults to |
| 69 | `$HOME`). |
| 70 | |
| 71 | |
| 72 | include::common-lttng-cmd-help-options.txt[] |
| 73 | |
| 74 | |
| 75 | include::common-lttng-cmd-after-options.txt[] |
| 76 | |
| 77 | |
| 78 | include::common-footer.txt[] |
| 79 | |
| 80 | |
| 81 | SEE ALSO |
| 82 | -------- |
| 83 | man:lttng(1), |
| 84 | man:lttng-load(1), |
| 85 | man:lttng-concepts(7) |