Backup and upgrade of running programs

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Backup and upgrade of running programs

Volker Wysk
Hi!

There's something that has troubled me for a long time. When you make a
backup, or do an upgrade, what happens when the affected programs or data are
still running or in use? Wouldn't this mean trouble?

There are a lot of programs for doing a backup or an upgrade, which let the
user do just that. For instance, KDE Discover and the KDE Muon Package
Manager. I'm not using those much, because I prefer command line. But it seems
like they let you upgrade a (running) program by doing nothing more than a few
clicks. Or what happens when you upgrade the KDE desktop, which is running at
the same time? Or make a (full) backup with some graphical tool?

Wouldn't it leave the system, or the backup, in an inconsistent state?

For instance, I had broken Kmail because of a bug. I was able to restore it
from a backup, by replacing some KMail-related files in .local and .config.
When doing a (full) backup, I log out of KDE and shut down the Apache and
Dovecot services. Then I use a virtual terminal. This way, I have been able to
repair KMail.

Isn't it necessary to, in principle, shut down affected services, before doing
a backup or an upgrade? Why isn't that recommended anywhere?

Bye,
Volker



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Backup and upgrade of running programs

Little Girl
Hey there,

Volker Wysk wrote:

>There's something that has troubled me for a long time. When you
>make a backup, or do an upgrade, what happens when the affected
>programs or data are still running or in use? Wouldn't this mean
>trouble?

It can, but many programs are pretty polite about such things and
will do a quick save before shutting down if something dramatic
happens. I wouldn't count on that, though, and would always err on
the side of caution.

>There are a lot of programs for doing a backup or an upgrade, which
>let the user do just that. For instance, KDE Discover and the KDE
>Muon Package Manager. I'm not using those much, because I prefer
>command line. But it seems like they let you upgrade a (running)
>program by doing nothing more than a few clicks. Or what happens
>when you upgrade the KDE desktop, which is running at the same time?
>Or make a (full) backup with some graphical tool?
>
>Wouldn't it leave the system, or the backup, in an inconsistent
>state?

I could be wrong, but I'm pretty sure that when you upgrade the
desktop, you get a little pop-up telling you you'll need to restart
for the settings to take effect, which means you're still using the
old desktop until then and shouldn't have any issues.

>Isn't it necessary to, in principle, shut down affected services,
>before doing a backup or an upgrade?

That's never a bad idea.

>Why isn't that recommended anywhere?

I think it is. I don't have an examples off the top of my head, but
I'm sure I've seen recommendations like that at times.

--
Little Girl

There is no spoon.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Backup and upgrade of running programs

Nils Kassube
In reply to this post by Volker Wysk
Volker Wysk wrote:
> There's something that has troubled me for a long time. When you make
> a backup, or do an upgrade, what happens when the affected programs
> or data are still running or in use? Wouldn't this mean trouble?

> Wouldn't it leave the system, or the backup, in an inconsistent state?

No. The program that is still running is the executable program and the
libraries which were installed at the time the program was started, i.e.
before the upgrade. This is still running in the RAM of the machine,
while the executable and libraries on the disk may be a new version
already. Only if you want to use the new version of the upgraded
program, you have to restart it.

I'm not sure about backups though. I suppose there it depends on the
backup program if you could get troubles.


Nils


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Backup and upgrade of running programs

Volker Wysk
In reply to this post by Little Girl
Am Dienstag, 1. Januar 2019, 01:40:46 CET schrieb Little Girl:

> >There are a lot of programs for doing a backup or an upgrade, which
> >let the user do just that. For instance, KDE Discover and the KDE
> >Muon Package Manager. I'm not using those much, because I prefer
> >command line. But it seems like they let you upgrade a (running)
> >program by doing nothing more than a few clicks. Or what happens
> >when you upgrade the KDE desktop, which is running at the same time?
> >Or make a (full) backup with some graphical tool?
> >
> >Wouldn't it leave the system, or the backup, in an inconsistent
> >state?
>
> I could be wrong, but I'm pretty sure that when you upgrade the
> desktop, you get a little pop-up telling you you'll need to restart
> for the settings to take effect, which means you're still using the
> old desktop until then and shouldn't have any issues.

For something big, there aren't just the executable programs and libraries,
but a lot of other files. You will run a mixture of old executables and new
support files.

In other words, you are supposed to count on luck. It might go smoothly most
of the time, but when something drastic is being done (such as a release-
upgrade) you better log out, stop servers and do it from a virtual console.

Bye
Volker



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Backup and upgrade of running programs

Volker Wysk
In reply to this post by Nils Kassube
Am Dienstag, 1. Januar 2019, 08:12:13 CET schrieb Nils Kassube:

> Volker Wysk wrote:
> > There's something that has troubled me for a long time. When you make
> > a backup, or do an upgrade, what happens when the affected programs
> > or data are still running or in use? Wouldn't this mean trouble?
> >
> > Wouldn't it leave the system, or the backup, in an inconsistent state?
>
> No. The program that is still running is the executable program and the
> libraries which were installed at the time the program was started, i.e.
> before the upgrade. This is still running in the RAM of the machine,
> while the executable and libraries on the disk may be a new version
> already. Only if you want to use the new version of the upgraded
> program, you have to restart it.

Yes, but see the other mail.

> I'm not sure about backups though. I suppose there it depends on the
> backup program if you could get troubles.

I think backups are more problematic than upgrades. When backing up the data
of some service, while it is running, you get a (hopefully consistent) image
of one point in time of the service. This might not be a correct state to
start it up from, again.

When I imagine to restore Akonadi from a backup, which has been taken while
Akonadi was running, I get a stomach ache...

Cheers
Volker



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users