/var not in the snapshots

Moderator: BarryK

Post Reply
Caramel
Posts: 557
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 107 times
Been thanked: 101 times

/var not in the snapshots

Post by Caramel »

The /var directory is not in the snapshots

See the exclusions
-in init (for the snapshots after installaion or update) line 1856

echo -e 'dev\nmnt\nproc\nrun\nsys\ntmp\nvar\n.fsckme.flg\nlost+found\nroot/.XLOADED\n.control' > exclusions1

-in /usr/local/easy_version/easy-version-control line 582

echo -e 'dev\nmnt\nproc\nrun\nsys\ntmp\nvar\n.fsckme.flg\nlost+found\nroot/.XLOADED\n.control' > /tmp/easy_version_control/snapshot-exclusions1

When you rollback, the directory .session is totally removed and recreated with the snapshot we return to (See /sbin/rollback in initrd)

So the content of /var is lost

User avatar
BarryK
Posts: 2959
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 159 times
Been thanked: 819 times

Re: /var not in the snapshots

Post by BarryK »

Hmmm, yes.
I can understand removing some subfolders, such as /var/cache, /var/tmp, /var/lock

OK, I will think about it some more.
Thanks for reporting.

User avatar
BarryK
Posts: 2959
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 159 times
Been thanked: 819 times

Re: /var not in the snapshots

Post by BarryK »

Caramel
Posts: 557
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 107 times
Been thanked: 101 times

Re: /var not in the snapshots

Post by Caramel »

BarryK wrote: Tue Jan 28, 2025 2:37 pm

I have implemented a fix:

https://bkhome.org/news/202501/fix-snap ... g-var.html

I'm sorry

In /usr/local/easy_version/easy-version-control I had missed the line 404

echo -e 'dev\nmnt\nproc\nrun\nsys\ntmp\nvar\n.fsckme.flg\nlost+found\nroot/.XLOADED\n.control' > /tmp/easy_version_control/snapshot-exclusions1

NEW EDIT: It replaces the previous Edit
I tested the creation of a snapshot with the modified line from the fix in easy-version-control (both lines 404 and 582 were replaced)

I was surprised as there was missing directories or files in the /var directory of the snapshot but the snapshot save only the /var in /mnt/wkg/.session.

So mksquasfs worked well in my test

capture12294.png
capture12294.png (24.01 KiB) Viewed 183 times
Post Reply

Return to “EasyOS”