From da263719bc13e65b8f5948e657a4b2555523d509 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Sun, 16 Nov 2014 11:24:11 +0000 Subject: Implement support for listing a generation in kdirstat.cache format This implements an ls variant whose output format is compatible with the kdirstat cache format. The best reference I can find for this is from an old fork: https://github.com/thomas-joiner/k4dirstat/blob/master/kdirstat/cache-file-format.txt Recent versions of k4dirstat appear to be able to read the files produced just fine, although this document is not present in their source AFAICT. I find k4dirstat to be an excellent way to visualise what is included in a backup, e.g. for the purposes of excluding file types or marking directories with a CACHEDIR.TAG. My previous solution involved post-processing the output of ls which require a ssh to the machine with the files (for stat() purposes). This approach pulls all of the data out of the obnam repo, so is much faster, less hacky and gets the status of the actual generation and not the current files etc. --- manual/en/120-misc.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'manual/en') diff --git a/manual/en/120-misc.mdwn b/manual/en/120-misc.mdwn index 0ed6c7fd..d80e8231 100644 --- a/manual/en/120-misc.mdwn +++ b/manual/en/120-misc.mdwn @@ -3,3 +3,19 @@ Other stuff This chapter discusses topics that do not warrant a chapter of their own, such as compressing backups and running Obnam from cron. + +k4dirstat cache files +--------------------- + +[k4dirstat] is a utility for visualising the disk space used by a +directory tree. Obnam's `kdirstat` command can be used to produce a +listing of the contents of a generation in a format which can be read +by k4dirstat using `File`, `Read Cache File` from the k4dirstat +menu. e.g. + + $ obnam kdirstat --client CLIENT --generation GENID > CLIENT.kdirstat.cache + $ gzip -v9 CLIENT.kdirstat.cache # OPTIONAL + +`CLIENT.kdirstat.cache[.gz]` can now be read by `k4dirstat`. + +[k4dirstat]: https://bitbucket.org/jeromerobert/k4dirstat/wiki/Home -- cgit v1.2.1