8 lttng-save - Save LTTng tracing session configurations
14 *lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *save* [option:--force] [option:--output-path='DIR']
15 [option:--all | 'SESSION']
20 The `lttng save` command saves to files the configurations of:
22 With the 'SESSION' argument::
23 The tracing session named 'SESSION'.
25 Without the 'SESSION' argument::
26 Implicit option:--all option: *all* the tracing sessions of the
27 connected session daemon for your Unix user, or for all users if
28 your Unix user is `root`, as listed in the output of `lttng list`
29 (see man:lttng-list(1)).
31 See the ``Session daemon connection'' section of man:lttng(1) to learn
32 how a user application connects to a session daemon.
34 See man:lttng-concepts(7) to learn more about tracing sessions.
36 Use the `save` command in conjunction with the man:lttng-load(1) command
37 to save and restore the complete configurations of tracing sessions.
39 The `save` command does :not: save tracing data, only the tracing
40 session parameters, including the channel and recording event rule
43 The default output directory path is `$LTTNG_HOME/.lttng/sessions`
44 (`$LTTNG_HOME` defaults to `$HOME`). Override the default output
45 directory path with the option:--output-path option. Each tracing
46 session configuration file is named __SNAME__++.lttng++,
47 where{nbsp}__SNAME__ is the original tracing session name.
49 By default, the `save` command does :not: overwrite existing tracing
50 session configuration files: the command fails. Allow the `save` command
51 to overwrite existing tracing session configuration files with the
52 option:--force option.
54 See the ``<<examples,EXAMPLES>>'' section below for usage examples.
57 include::common-lttng-cmd-options-head.txt[]
60 option:-a, option:--all::
61 Save all the tracing session configurations of your Unix user, or of
62 all users if your Unix user is `root`, as listed in the output of
63 man:lttng-list(1), instead of the current tracing session or the
64 tracing session named 'SESSION'.
66 option:-f, option:--force::
67 Overwrite existing tracing session configuration files when
70 option:-o 'DIR', option:--output-path='DIR'::
71 Save tracing session configuration files to the directory 'DIR'
72 instead of `$LTTNG_HOME/.lttng/sessions` (`$LTTNG_HOME` defaults to
76 include::common-lttng-cmd-help-options.txt[]
79 include::common-lttng-cmd-after-options.txt[]
85 .Save all the tracing session configurations to the default output directory.
93 .Save a specific tracing session configuration to a specific output directory.
95 See the option:--output-path option.
99 $ lttng save my-session --output-path=/path/to/sessions
103 .Allow LTTng to overwrite existing tracing session configuration files when saving.
105 See the option:--force option.
114 include::common-footer.txt[]
121 man:lttng-concepts(7)