[systemd-devel] systemctl isolate "foo.service" expands to "foo.service.target"
Chris Atkinson
cwa at pipeline.com
Fri Nov 28 07:40:31 PST 2014
How does this interact with snapshots? While I was looking at man
systemctl it seems that one uses isolate to restore to a previous
snapshot:
Snapshot Commands
snapshot [NAME]
Create a snapshot. If a snapshot name is specified, the new
snapshot will be named after it. If none is specified, an automatic
snapshot name is generated. In either case, the snapshot name used
is printed to standard output, unless --quiet is specified.
A snapshot refers to a saved state of the systemd manager.
It is implemented itself as a unit that is generated
dynamically with this command and has dependencies on all
units active at the time. At a later time, the user may
return to this state by using the isolate command on the
snapshot unit.
Snapshots are only useful for saving and restoring which
units are running or are stopped, they do not save/restore
any other state. Snapshots are dynamic and lost on reboot.
I created a named snapshot:
$ sudo systemctl snapshot derpy
derpy.snapshot
I tried restoring the named snapshot, but the mandatory mangling
to .target got in the way:
$ sudo systemctl isolate derpy.snapshot
Failed to start derpy.snapshot.target: Operation refused, unit may not
be isolated.
Results were the same with an automatically named snapshot.
Did I misunderstand the man page and there's some other way to restore
a snapshot?
Thanks,
More information about the systemd-devel
mailing list