Tiny Core Base > TCB Tips & Tricks

Some filetool.sh backup excludes

(1/1)

CNK:
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:


* ~/.mozilla/firefox/[profile]/sessionstore-backups contained session records from months ago, one was 4.2MB
* ~/.mozilla/firefox/Crash Reports contained 1.5MB of data on old crashes
* ~/.mozilla/firefox/[profile]/storage-sync-v2.sqlite-wal was 12.2MB and grows pointlessly over time due to this bug, commonly triggered by NoScript
I added this to /opt/.xfiletool.lst:

--- Code: ---.dbus/session-bus
.mozilla/firefox/Crash Reports
sessionstore-backups

--- End code ---

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: ---for db in /home/*/.mozilla/firefox/*/storage-sync-v2.sqlite; do sqlite3 "$db" .tables; done

--- End code ---

The "-wal" files then get automatically deleted by sqlite3.

CNK:

--- Quote from: CNK on July 24, 2025, 09:12:47 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):

--- End quote ---

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.

Navigation

[0] Message Index

Go to full version