Tiny Core Linux

Tiny Core Base => TCB Tips & Tricks => Topic started by: CNK on July 24, 2025, 09:12:47 PM

Title: Some filetool.sh backup excludes
Post by: CNK on July 24, 2025, 09:12:47 PM
Some ways I shrunk my mydata.tgz backup size, which might be commonly desired.

Dbus built up a few megabytes of files in ~/.dbus/session-bus over the years which don't need to be kept.

I keep my Firefox data in mydata.tgz rather than symlinking ~/.mozilla to a physical drive since it makes it easy to copy the backups regularly and revert to old copies. But a lot of data in there now turned out to be junk:


I added this to /opt/.xfiletool.lst:
Code: [Select]
.dbus/session-bus
.mozilla/firefox/Crash Reports
sessionstore-backups

For storage-sync-v2.sqlite-wal, load sqlite3-bin and run this command (based on the one in the bug report) as root to automatically clean it up in all Firefox profiles (I added it in /opt/shutdown.sh):
Code: [Select]
for db in /home/*/.mozilla/firefox/*/storage-sync-v2.sqlite; do sqlite3 "$db" .tables; done

The "-wal" files then get automatically deleted by sqlite3.
Title: Re: Some filetool.sh backup excludes
Post by: CNK on July 29, 2025, 11:30:25 PM
For storage-sync-v2.sqlite-wal, load sqlite3-bin and run this command (based on the one in the bug report) as root to automatically clean it up in all Firefox profiles (I added it in /opt/shutdown.sh):

Ah but /opt/shutdown.sh runs after the backup so that didn't work and storage-sync-v2.sqlite-wal is back to 1.7MB already! I remembered I've set up my own script calling backup before power-off and added the command to clear it in there instead.