Mailing List Archive

How to replay a backup system?
Hi,
from time to time - as was the case a few days ago - Gentoo updates
lead to an unbootable system.
I backup my system each day - using BTRFS snapshots.

Now, only a few files on current system have changed; the rest of the
400 GB root partition is unchanged.
Therefore I only have to replace these newer files by the versions
saved a day before.

How can this be done efficiently? Unfortunately AFAIK rsync doesn't
have an option to copy only files which are
NEWER on the destination than the corresponding files in the backup.

Many thanks for a hint,
Helmut
Re: How to replay a backup system? [ In reply to ]
On Thu, 12 Oct 2023 18:54:10 +0200, Helmut Jarausch wrote:

> from time to time - as was the case a few days ago - Gentoo updates
> lead to an unbootable system.
> I backup my system each day - using BTRFS snapshots.
>
> Now, only a few files on current system have changed; the rest of the
> 400 GB root partition is unchanged.
> Therefore I only have to replace these newer files by the versions
> saved a day before.
>
> How can this be done efficiently? Unfortunately AFAIK rsync doesn't
> have an option to copy only files which are
> NEWER on the destination than the corresponding files in the backup.

You can replace the original root subvolume with the snapshot. One way of
doiing it is detailed at
https://unix.stackexchange.com/questions/19211/how-to-create-a-snapshot-in-btrfs-and-then-rollback-to-it-after-some-work


--
Neil Bothwick

Bang on the LEFT side of your computer to restart Windows
Re: How to replay a backup system? [ In reply to ]
On 10/12/2023 07:09:35 PM, Neil Bothwick wrote:
> On Thu, 12 Oct 2023 18:54:10 +0200, Helmut Jarausch wrote:
>
> > from time to time - as was the case a few days ago - Gentoo updates
> > lead to an unbootable system.
> > I backup my system each day - using BTRFS snapshots.
> >
> > Now, only a few files on current system have changed; the rest of
> the
> > 400 GB root partition is unchanged.
> > Therefore I only have to replace these newer files by the versions
> > saved a day before.
> >
> > How can this be done efficiently? Unfortunately AFAIK rsync doesn't
> > have an option to copy only files which are
> > NEWER on the destination than the corresponding files in the backup.
>
> You can replace the original root subvolume with the snapshot. One
> way of
> doiing it is detailed at
> https://unix.stackexchange.com/questions/19211/how-to-create-a-snapshot-in-btrfs-and-then-rollback-to-it-after-some-work
>
>

Thanks Neil,

unfortunately my root FS is of type ext4, only my backup FS is of type
BTRFS

Helmut