The stores.conf is a Cascading Configuration File that contains information on the stores bacsy-server will backup. When starting, bacsy-server will read either from stores.config in the directory given in a -c switch, or when no such switch is given from stores.config in $XDG_CONFIG_HOME/bacsy, or from ~/.config/bacsy/stores.config when $XDG_CONFIG_HOME is not defined.
Every section name, except for global (which is optional), defines a new data store. Store names obviously have to be unique. The following keys can be defined:
Default Value: (none)
Semantics: The base directory in which all backups and associated data will be stored.
Example 1:
Location = /media/external_drive/backups
Will store all backups this store accepts in /media/external_drive/backups.
Default Value: ?
Domain: [0,10]
Semantics: Determines how high a source’s priority must be before it is accepted by this store. Only runs from sources with a Priority higher than or equal to (and thus a number that is smaller than or equal to) this store’s MinPriorityForStoring will be stored.
Default Value: 2
Domain: [0 - 2 147 483 648[
Semantics: The maximum number of non-full backup runs Bacsy will execute before forcing a full run.
Default Value: 1 year
Domain: <number> <unit> where number must be an integer and <unit> can be either day, days, month, months, year, years.
Semantics: The Server is free to erase backup runs that are older than this. Note that a month is defined as 31 days and a year as 366 days (maximal values were chosen to ensure users aren’t surprised their data is gone).
Default Value: True
Domain: { True, False }
Semantics: When AlwaysPresent is True, Bacsy will assume this store is permanently connected. If the directory given in Location does not exist, it will be created. When it cannot be created, an error will be produced.
If AlwaysPresent is False and the directory in Location cannot be found, this directory will not be created and the store will be silently ignored.
Default Value: True
Domain: { True, False }
Semantics: If a store is disabled, nothing will ever be stored to it. Use this switch to keep the configuration for a store, without actually using it.
Note
The complete list of all configuration options can be found on Configuration Files
Note
All good ASCII art is courtesy of Joan Stark, all bad ASCII art is me changing her work for the worse.
The easiest possible setup: a single source and only one store:
.----.
.---------. | == |
|.-"""""-.| |----|
|| || | == |
|| || |----|
|'-.....-'| |::::|
`"")---(""` |___.|
/:::::::::::\" _ "
/:::=======:::\`\`\
jgs `"""""""""""""` '-'
1 Source
1 Store
The file sources.config will contain something like:
[ entireHomeDirectory ]
Include[] = /home/ives
Exclude[] = *.bak
Exclude[] = *~
ExecuteAt = every wednesday at 21:00h
The file stores.config will contain something like:
[ externalStore ]
Location = /media/usbDrive/backup
This will backup all files in /home/ives, except for those matching *.bak or *~ on every Wednesday at 8 p.m. It will store backups for them in /media/usbDrive/backup.
A setup where there is one “server” and one “workstation”. All backups for the workstation will be stored on the server. The server itself does not have any backup sources.
WORKSTATION SERVER
.----. _________
.---------. | == | | _______o|
|.-"""""-.| |----| ||_______||
|| || | == | | _______ |
|| || |----| ========= ||_______||
|'-.....-'| |::::| |---------|
`"")---(""` |___.| | O |
/:::::::::::\" _ " | | |
/:::=======:::\`\`\ | | |
jgs `"""""""""""""` '-' |:::::::::|
1 Source 0 Sources
0 Store 1 Store
The file sources.config will contain something like:
[ entireHomeDirectory ]
Include[] = /home/ives
Include[] = /home/naomi/importantFile
Exclude[] = /home/ives/movies
ExecuteAt = every 6 hours
No stores.config is present on the workstation.
The file stores.config will contain something like:
[ externalStore ]
Location = /media/bigdrive/
This setup will backup all files and directories in /home/ives, except for those in /home/ives/movies. It will also backup the file /home/naomi/importantFile. The backup will run every six hours. The workstation and server obviously have to be connected to the same LAN.