<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.freegeek.org/index.php?action=history&amp;feed=atom&amp;title=User%3AEvilgold%2Fscipts</id>
	<title>User:Evilgold/scipts - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.freegeek.org/index.php?action=history&amp;feed=atom&amp;title=User%3AEvilgold%2Fscipts"/>
	<link rel="alternate" type="text/html" href="http://wiki.freegeek.org/index.php?title=User:Evilgold/scipts&amp;action=history"/>
	<updated>2026-04-22T12:08:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.freegeek.org/index.php?title=User:Evilgold/scipts&amp;diff=51938&amp;oldid=prev</id>
		<title>Evilgold: New page: Backing up .mozilla (firefox settings):   find ~/.mozilla/firefox/ -type f -name &quot;*.sqlite&quot; -exec sqlite3 {} VACUUM \;  find ~/.mozilla/firefox/ -type f -name &quot;*.sqlite&quot; -exec sqlite3 {} R...</title>
		<link rel="alternate" type="text/html" href="http://wiki.freegeek.org/index.php?title=User:Evilgold/scipts&amp;diff=51938&amp;oldid=prev"/>
		<updated>2010-09-14T11:48:23Z</updated>

		<summary type="html">&lt;p&gt;New page: Backing up .mozilla (firefox settings):   find ~/.mozilla/firefox/ -type f -name &amp;quot;*.sqlite&amp;quot; -exec sqlite3 {} VACUUM \;  find ~/.mozilla/firefox/ -type f -name &amp;quot;*.sqlite&amp;quot; -exec sqlite3 {} R...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Backing up .mozilla (firefox settings):&lt;br /&gt;
&lt;br /&gt;
 find ~/.mozilla/firefox/ -type f -name &amp;quot;*.sqlite&amp;quot; -exec sqlite3 {} VACUUM \;&lt;br /&gt;
 find ~/.mozilla/firefox/ -type f -name &amp;quot;*.sqlite&amp;quot; -exec sqlite3 {} REINDEX \;&lt;br /&gt;
 tar czvf ~/Backups/mozilla-backup.tar.gz ~/.mozilla --exclude=cache&lt;br /&gt;
&lt;br /&gt;
This script first attempts to clean the sql database firefox uses, then creates a tarball of all the files in the .mozilla folder, except for the cache, which isnt needed and usually takes up most of the space. If for whatever reason you want to backup the cache too, just remove --exclude=cache&lt;br /&gt;
&lt;br /&gt;
Backup .purple (pidgin) except for chat logs&lt;br /&gt;
&lt;br /&gt;
 tar czvf ~/Backups/purple.tar.gz ~/.purple --exclude=logs&lt;br /&gt;
&lt;br /&gt;
Move /usr to a squashfs loop filesystem (archlinux only)&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Created by Brando56894 from the Arch Linux Community&lt;br /&gt;
 #Based off of a tutorial found on the Gentoo forums&lt;br /&gt;
 #This script comes with ABSOLUTELY NO WARRANTY use it at your risk!&lt;br /&gt;
 #checks to see if the user is root&lt;br /&gt;
 if [[ $UID != &amp;quot;0&amp;quot; ]];then&lt;br /&gt;
     echo &amp;quot;This script MUST be run as root&amp;quot;&lt;br /&gt;
     echo &amp;quot;Please login to the root account&amp;quot;&lt;br /&gt;
     echo &amp;quot;And re-execute this script&amp;quot;&lt;br /&gt;
     exit&lt;br /&gt;
 fi&lt;br /&gt;
 echo &amp;quot;This script will place /usr into a squashfs for faster loading&amp;quot;&lt;br /&gt;
 read -p &amp;quot;Press enter to continue&amp;quot;&lt;br /&gt;
 #installs aufs2 and squashfs tools&lt;br /&gt;
 pacman -Sy --needed aufs2 aufs2-util squashfs-tools&lt;br /&gt;
 #creates the directories that /usr will be squashed into&lt;br /&gt;
 echo&lt;br /&gt;
 mkdir -p /squashed/usr/{ro,rw}&lt;br /&gt;
 #compress /usr into a squashfile with a 64k blocksize&lt;br /&gt;
 if [[ -e /var/lib/pacman/db.lck ]]; then&lt;br /&gt;
  echo &amp;quot;Pacman seems to be in use, please wait for it to finish&amp;quot;&lt;br /&gt;
  echo &amp;quot;before you create the squashfs image or else nasty things&amp;quot;&lt;br /&gt;
  echo &amp;quot;will most likely happen to your system&amp;quot;&lt;br /&gt;
 else&lt;br /&gt;
  mksquashfs /usr /squashed/usr/usr.sfs -b 65536&lt;br /&gt;
 fi&lt;br /&gt;
 #adds the filesystems to fstab&lt;br /&gt;
 echo &amp;quot;Please add the following lines to your /etc/fstab&amp;quot;&lt;br /&gt;
 echo&lt;br /&gt;
 echo &amp;quot;/squashed/usr/usr.sfs    /squashed/usr/ro squashfs     loop,ro 0 0&amp;quot; &lt;br /&gt;
 echo &amp;quot;usr /usr  aufs  br:/squashed/usr/rw:/squashed/usr/ro 0 0&amp;quot;&lt;br /&gt;
 echo&lt;br /&gt;
 read -p &amp;quot;Press any key to continue after you finished editing the file&amp;quot;&lt;br /&gt;
 echo&lt;br /&gt;
 #probably not needed since the umount -a option should do it but left it in case it is needed&lt;br /&gt;
 #unmounts the squashfs during shutdown&lt;br /&gt;
 #echo &amp;quot;Please add the following lines to /etc/rc.shutdown&amp;quot;&lt;br /&gt;
 #echo &amp;quot;under the Unmounting Filesystems section&amp;quot;&lt;br /&gt;
 #echo&lt;br /&gt;
 #echo &amp;quot;umount -l /usr&amp;quot;&lt;br /&gt;
 #echo &amp;quot;umount -l /squashed/usr/ro&amp;quot;&lt;br /&gt;
 #echo&lt;br /&gt;
 #read -p &amp;quot;Press any key to continue after you finished editing the file&amp;quot;&lt;br /&gt;
 #echo&lt;br /&gt;
 #move the /usr folder instead of deleting it&lt;br /&gt;
 mv /usr /usr.old&lt;br /&gt;
 mkdir /usr&lt;br /&gt;
 echo &amp;quot;Would you like to set up a cron job to remake the image&amp;quot;&lt;br /&gt;
 echo &amp;quot;Every three weeks? (y or n)&amp;quot;&lt;br /&gt;
 read choice&lt;br /&gt;
 if [[ choice == &amp;quot;y&amp;quot; ]];then&lt;br /&gt;
    #sets up a cron job to remake the image every three weeks&lt;br /&gt;
    echo &amp;quot;Please add the following to your crontab&amp;quot;&lt;br /&gt;
    echo &amp;quot;and place remake-squash.job in /etc/cron.monthly&amp;quot;&lt;br /&gt;
    echo &lt;br /&gt;
    echo &amp;quot;It will remake the sqashfs image every 21 days at noon&amp;quot;&lt;br /&gt;
    echo&lt;br /&gt;
    echo &amp;quot;0 12 21 * * bash /etc/cron.monthly/remake-squashfs.job&amp;quot;&lt;br /&gt;
 fi&lt;/div&gt;</summary>
		<author><name>Evilgold</name></author>
	</entry>
</feed>