EasyOS - /root not in snapshots

Moderator: BarryK

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

EasyOS - /root not in snapshots

Post by Caramel »

I used easy version control to return to 5.8.1 from 5.8.2.

At the boot of 5.8.1, quicksetup is launched. Fr stayed the default but the icons on the desktop are now in English (even after reboot)

All my customizations of the desktop are lost.

Firefox started but all the settings and cache have dissappeared.

Many files and settings are disappeared.

I opened the old snapshots . There is no r/oot directory in them.

Test of creation of a snapshot in the old installed 5.8.1
The file with the list of excluded files (/tmp/snapshot-exclusions1):

dev
mnt
proc
run
sys
tmp
var
.fsckme.flg
lost+found
root/.XLOADED
.control
home
firefox
.cache
root
.cache

root and firefox are on the list

lines 403 to 408 from /usr/local/easy_version/easy-version-control :

Code: Select all

 #20221015 get rid of .cache folders...
 DOTC="$(find /mnt/${WKG_DEV}/${WKG_DIR}.session -maxdepth 3 -type d -name '.cache' | cut -f 6- -d '/' | tr '/n' ' ')" #ex: home/firefox/.cache
 for aDOTC in $DOTC
 do
  echo "$aDOTC" >> /tmp/easy_version_control/snapshot-exclusions1
 done

After initialization of WKG_DEV and WKG_DIR

# find /mnt/${WKG_DEV}/${WKG_DIR}.session -maxdepth 3 -type d -name '.cache' | cut -f 6- -d '/' | tr '/n' ' '
home firefox .cache
root .cache

and

# find /mnt/${WKG_DEV}/${WKG_DIR}.session -maxdepth 3 -type d -name '.cache' | cut -f 6- -d '/'
home/firefox/.cache
root/.cache

(Edit : correction of a typo)

Last edited by Caramel on Thu May 16, 2024 12:46 pm, edited 1 time in total.
User avatar
BarryK
Posts: 2738
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 135 times
Been thanked: 745 times

Re: EasyOS - /root not in snapshots

Post by BarryK »

Rollback to an earlier version is broken.

I posted that it is broken in the 5.8.2 announcement:

https://bkhome.org/news/202405/easyos-582-released.html

Also mentioned it in this forum.

There are quite a few things wrong, I expect to fix it in 5.8.3.

Thanks for reporting that fault in easy-version-control, I will check it out.

User avatar
BarryK
Posts: 2738
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 135 times
Been thanked: 745 times

Re: EasyOS - /root not in snapshots

Post by BarryK »

Caramel wrote: Thu May 16, 2024 11:09 am

After initialization of WKG_DEV and WKG_DIR

# find /mnt/${WKG_DEV}/${WKG_DIR}.session -maxdepth 3 -type d -name '.cache' | cut -f 6- -d '/' | tr '/n' ' '
home firefox .cache
root .cache

I don't see how it is possible to get this result.

What do you mean by "After initialization of WKG_DEV and WKG_DIR"?
They are set early in the script, line 63:

Code: Select all

. /etc/rc.d/PUPSTATE
Caramel
Posts: 483
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 101 times
Been thanked: 81 times

Re: EasyOS - /root not in snapshots

Post by Caramel »

BarryK wrote: Thu May 16, 2024 12:58 pm
Caramel wrote: Thu May 16, 2024 11:09 am

After initialization of WKG_DEV and WKG_DIR

# find /mnt/${WKG_DEV}/${WKG_DIR}.session -maxdepth 3 -type d -name '.cache' | cut -f 6- -d '/' | tr '/n' ' '
home firefox .cache
root .cache

I don't see how it is possible to get this result.

What do you mean by "After initialization of WKG_DEV and WKG_DIR"?
They are set early in the script, line 63:

Code: Select all

. /etc/rc.d/PUPSTATE

I tested the command in sakura

As WKG_DEV and WKG=DIR are empty by default in sakura, I initialized them by assigning their values :
WKG_DEV=sdX (where X is the number of the installation partition) (Edit ; correction)
WKG_DIR="name of the installation directory"/

User avatar
BarryK
Posts: 2738
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 135 times
Been thanked: 745 times

Re: EasyOS - /root not in snapshots

Post by BarryK »

OK, so the code you quoted from easy-version-control is working.

It will include /home/firefox/.cache in the exclude list.
This is intentional, as the cache grows very big, and isn't really needed to be saved.

Ditto /root/.cache is in the exclude list.

The only thing that I can see wrong with the code that you quoted, is if $WKG_DIR is empty, that is, EasyOS is installed to the root of the partition.
Or installed deeper, say WKG_DIR=pups/easyos/

I fixed that:

Code: Select all

 #20221015 get rid of .cache folders...
 #20240515 handle if $WKG_DIR is empty...
 DOTC="$(find /mnt/${WKG_DEV}/${WKG_DIR}.session -maxdepth 3 -type d -name '.cache' | sed -e 's%.*\.session/%%' | tr '/n' ' ')" #ex: home/firefox/.cache
 for aDOTC in $DOTC
 do
  echo "${aDOTC}" >> /tmp/easy_version_control/snapshot-exclusions1
 done
Caramel
Posts: 483
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 101 times
Been thanked: 81 times

Re: EasyOS - /root not in snapshots

Post by Caramel »

BarryK wrote: Thu May 16, 2024 1:41 pm

OK, so the code you quoted from easy-version-control is working.

No, it doesn't

We have

# find /mnt/${WKG_DEV}/${WKG_DIR}.session -maxdepth 3 -type d -name '.cache' | cut -f 6- -d '/' | tr '/n' ' '
home firefox .cache
root .cache

then

#DOTC="$(find /mnt/${WKG_DEV}/${WKG_DIR}.session -maxdepth 3 -type d -name '.cache' | cut -f 6- -d '/' | tr '/n' ' ')"
#echo $DOTC
home firefox .cache root .cache

then

# mkdir -p /tmp/easy_version_control/
for aDOTC in $DOTC
do
echo "$aDOTC" >> /tmp/easy_version_control/snapshot-exclusions1
done
#cat /tmp/easy_version_control/snapshot-exclusions1
home
firefox
.cache
root
.cache

User avatar
BarryK
Posts: 2738
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 135 times
Been thanked: 745 times

Re: EasyOS - /root not in snapshots

Post by BarryK »

Ha ha ha, it was too obvious for me to see. A typo.
'/n' should be '\n'

'\n' means the new-line character.

User avatar
BarryK
Posts: 2738
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 135 times
Been thanked: 745 times

Re: EasyOS - /root not in snapshots

Post by BarryK »

Caramel,
Thanks for insisting that it was not fixed.
I have posted to my blog:

https://bkhome.org/news/202405/snapshot ... g-fix.html

Post Reply

Return to “EasyOS”