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:
.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):
for db in /home/*/.mozilla/firefox/*/storage-sync-v2.sqlite; do sqlite3 "$db" .tables; done
The "-wal" files then get automatically deleted by sqlite3.