Skip to content
Michele Alessandrini edited this page Jan 10, 2019 · 10 revisions

First steps

Prebackup lets you scan "snapshots" of the directories you choose, and compare them with each other. A snapshot contains information on the size only of each directory and subdirectory, and its purpose is keeping track of the total size of the data you want to backup, comparing it over time to fine-tune the selection of directories you actually want to backup.

The first thing to do is selecting the "root directories" you want to compute the size of:

Here three directories have been selected, /etc, /var/lib and /home/michele:

Now you can scan a snapshot of your root directories:

This will take a while. In the end you'll have something like this:

In the "Current snapshot" box you can see the snapshot's summary (date and total size). In the tree view you can see the various sizes computed for each directory and subdirectory. The "file size" column lists the size of only the files contained in that directory's level, without subdirectories, while the "total size", more interesting, is the size of that directory with all of its subdirectories (ignore the "diff. size" column for now). Here the tree is sorted by total size in descending order; click on the various headers to select the sorting you like.

Note the warning icon in the "state" column (icons can be different according to your desktop's theme): it means that some directories could not be scanned, likely because you don't have root permissions. Hover the mouse over the icon for an explanation.

From the same menu you can save the snapshot or load a previously saved one. Snapshots are typically saved in ~/.config/prebackup/.

Excluding directories from the computed size

If you backup whole directories like that, you'll likely end up with a huge backup, including many files that don't need to be there (remember, this is not a backup program! We're talking about the actual backup program you execute elsewhere). So it's very likely that you want to exclude some directories from the computation of the total size (and later from your backup).

Currently Prebackup ignores a directory (and all its subdirectories) if it contains a file with a given name. The default name is .nobackup, but you can configure it with "Snapshot -> Set exclusion file tag" (you will be asked the first time). It can be an empty file, but it must be a file and not a subdirectory.

To see the changes after tagging one or more directories like that, re-scan a snapshot and check what's changed in the relevant places. Excluded directories are marked with a icon (or similar) in the "state" column.

Note that your actual backup program may or may not support such a method to exclude directories. If not, use the "Output" menu to generate a file with the list of excluded directories, as computed from the current snapshot in memory, to be given to your backup program.

Comparing two snapshots

You can compare the current snapshot (newly scanned or loaded from a previously saved one) with a previous one. To do so, open a second snapshot for comparison:

The main window now looks like that:

The "current snapshot" box reports the total difference with the second snapshot, whose data are reported in the "comparing snapshot" box. Differences in size for single directories are listed in the "diff. size" column of the tree view. It can be useful to sort the list by "diff. size" to find the places with anomalous increases and tune the set of excluded directories, in order to keep your backup data from growing too much.