Unburden Your Home Directory
============================

unburden-home-dir allows users to move cache files from browsers,
etc. off their home directory, i.e. on a local harddisk or tmpfs and
replace them with a symbolic link to the new location (e.g. on /tmp/
or /scratch/) upon login. Optionally the contents of the directories
and files can be removed instead of moved.

This is helpful at least in the following cases:

The idea-giving case are big workstation setups where $HOME is on NFS
and all those caches put an unnecessary burden (hence the name) on the
file server since caching over NFS doesn't have the best performance
and may clog the NFS server, too.

A similar case, but with different purpose is reducing I/O on mobile
devices like laptops or netbooks to extend the battery life: Moving
browser caches etc. off the real disk into a tmpfs filesystem reduces
the amount of disk I/O which reduces the power consumption of the
disk.

Another possible solution for saving non-crucial I/O is using
eatmydata (http://www.flamingspork.com/projects/libeatmydata/) to
ignore a software's fsync calls.

The other type of use cases for unburden-home-dir is to reduce disk
space usage, e.g. on devices with small disk space but a lot of RAM as
seen often on boxes with flash disks or early netbooks, especially the
EeePC, where configurations with 4GB disk space and 2GB RAM are not
seldom. In this case you want to move off as many cache files, etc. as
possible to some tmpfs filesystem, e.g. /tmp/.

It may also help to reduce the amount of needed backup disk space by
keeping those files in places where they don't get backed up. In that
case it's an alternative to keeping the blacklist in your backup
software up-to-date.

This project initially started as an Xsession hook. It now consists of
a perl script which optionally can also be called from a provided
Xsession hook.

See http://wiki.phys.ethz.ch/readme/application_cache_files for the
detailed reasoning behind this project.


Source Code
===========

You should always find the newest code via git at either
http://git.phys.ethz.ch/?p=unburden-home-dir.git (primary site),
http://gitorious.org/unburden-home-dir/ or
http://github.com/xtaran/unburden-home-dir (mirrors, or in case you
prefer to use social forking :-).


Configuration files
===================

There are five configuration files for unburden-home-dir:

  /etc/unburden-home-dir         -- Global configuration file
  /etc/unburden-home-dir.list    -- Global list of files to take care of
  ~/.unburden-home-dir           -- Per user configuration file
  ~/.unburden-home-dir.list      -- Per user list of files to take care of
  /etc/default/unburden-home-dir -- Xsession hook configuration file

Explanation of the unburden-home-dir.list file format:

  1st column: Action ("d"/"r" or "m": delete/remove or move; the first
              two are equivalent)
  2nd column: Type ("d", "D", "f" or "F": directory or file, capital
              letter means "create it if it doesn't exist")
  3rd column: Path relative to $HOME to move off to some other location
  4th column: identifier for file or directory in the other location

Edit /etc/default/unburden-home-dir if you want to enable
unburden-home-dir for all users of a machine.on an Xsession based
login. But please be aware that if you do that on a machine with NFS
homes, you should do that on all (Unix) machines which have those NFS
homes mounted.

For installations where each user should be able to decide on his own
if unburden-home-dir should be run on X session start, add a line
saying "UNBURDEN_HOME=yes" to ~/.unburden-home-dir which is sourced by
the Xsession startup script in the same way as
/etc/default/unburden-home-dir (while being a configuration file for
unburden-home-dir itself at the same time, too).

See /usr/share/doc/unburden-home-dir/examples/ on debianoid
installations or etc/ in the source tar ball for example files.

A good start for checking what kind of caches you have in your home
directory is running

  find ~ -type d -iname '*cache*' -not -path '*/.git/*' -not -path '*/.hg/*' \
         -print0 | xargs -0 du -sh | sort -h


License
=======

All stuff in here is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 2 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program in the file COPYING.  If not, see
http://www.gnu.org/licenses/.
