On Tue, 10 Jul 2018 18:29:40 +0000, bob prohaska wrote:
> Is there a command that will save the present state of the system,
> reboot and then pick up where it left off?
>
Yes
"shutdown -r NOW" or "reboot" - run as root or via sudo.
But note that rebooting will stop all processes and close all network
sessions. There's no way round that.
> persist over at least a brief outage, so web and ssh-sessions should
> survive if the downtime doesn't last too long.
>
Nossir. Its not the duration of the gap but killing restarting the Linux
kernel that stops programs and closes network connections. Some daemons,
such as postfix or postgres, have a 'reload' command that do the sort of
very fast shutdown and restart. These can be run without a kernel reboot,
but are specific to the service they provide.
This is why I never leave system updates to run on autopilot: I turn
automatic updating off. This way I control what's happening and do a
weekly system update this involves these steps:
1) Stop whatever you're using the machine for - this includes shutting
down the web browser and mail reader, though I usually leave my
mail server running.
2) Do a system backup. I backup onto a pair of USB drives, using them in
strict rotation so one is always offline. I use rsync for this because
it is fast, only copying new material to the backup disk and
removing files from the backup that no longer exist on the system
being backed up.
3) Do the system update using apt_get and friends on the RPi and
dnf on Fedora systems.
4) reboot the system.
> At one time I encountered
> the notion of "checkpointing" long running jobs which could then be
> restarted where they left off after system maintenance was done, but
> that was 30+ years ago.
>
Programs that do this are still around, e.g. mailservers, DNS, the NTP
server if you use it, and database servers. These generally use
configuration options to determine how often they checkpoint themselves
and/or provide a control system (like the 'reload' commands described
above) to force a checkpoint, so reloads don't mess up the data.
Others, e.g. databases like PostgreSQL or MariaDB, provide methods that
their client programs can use to split the sequence of operations they
request up into 'commitment units'. These are logical chunks of work that
the server guarantees will be processed in their entirety or, in cases of
software or hardware failure, by rolled-back as if they'd not been
started.
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|