Discussion:
How to stop systemctl --user processes before backup runs then restart
(too old to reply)
Barry Scott
2017-12-31 17:41:23 UTC
Permalink
I think that for my backups to run for a user I will need to stop their systemd user services.

How do you recommend that I do that and after the backup has completed how do I startup
the syetemd user services again, just as happened at system boot?

Barry
Colin Guthrie
2018-01-04 13:08:33 UTC
Permalink
Post by Barry Scott
I think that for my backups to run for a user I will need to stop their systemd user services.
Out of curiosity, why do you think that the process needs to be stopped
for the backups to run?

Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
Tribalogic Limited http://www.tribalogic.net/
Open Source:
Mageia Contributor http://www.mageia.org/
PulseAudio Hacker http://www.pulseaudio.org/
Trac Hacker http://trac.edgewall.org/
Barry Scott
2018-01-04 19:35:05 UTC
Permalink
Post by Colin Guthrie
Post by Barry Scott
I think that for my backups to run for a user I will need to stop their
systemd user services.
Out of curiosity, why do you think that the process needs to be stopped
for the backups to run?
The process of concern are running fetchmail that is calling into dovecot.

If I do not stop dovecot the Mail dir will not be consistent.
If I do not stop the fetchmail process then dovecot will be called
and the backup can see an inconsistent state.

How do I know this? Becuase I created bad backups in the past.

systemd --user is great at running the fetchmail processes for
the sand boxed email users. I just need to figure out how to stop them
in a way that is "systemd" smart.

Barry
Tomasz Torcz 👁️
2018-01-04 22:49:11 UTC
Permalink
Post by Barry Scott
Post by Colin Guthrie
Post by Barry Scott
I think that for my backups to run for a user I will need to stop their
systemd user services.
Out of curiosity, why do you think that the process needs to be stopped
for the backups to run?
The process of concern are running fetchmail that is calling into dovecot.
If I do not stop dovecot the Mail dir will not be consistent.
If I do not stop the fetchmail process then dovecot will be called
and the backup can see an inconsistent state.
In such cases you should use "fsreeze" around backups.
--
Tomasz Torcz "God, root, what's the difference?"
xmpp: ***@chrome.pl "God is more forgiving."
Loading...