Configuration
The configuration of YRBA is rather simple, and requires just a few adjustments to get going.
The default location the configuration is read from is
~/.config/yrba/config.toml, and /etc/yrba.toml if run as the root user,
and can be changed by starting the executable with the
--config /path/to/config/file or -c /path/to/config/file flag.
If the application has been started without the -c flag, and the default
location does not contain a configuration file, it will automatically create an
example file.
An example configuration file looks somewhat like this:
# Remote address for uploading backups
# SFTP: 'sftp://root@127.0.0.1/path/to/my/backup/storage/directory'
# SMB: 'smb://user@127.0.0.1/share-name/path/to/my/backup/storage/directory'
# FILE: 'file:///path/to/my/local/backup/storage/directory'
remote = 'sftp://root@127.0.0.1/path/to/my/backup/storage/directory'
# The amount of backups to keep
# Set to 0 to never delete old backups
amount_of_backups_to_keep = 5
# Path to folders to back up, supports relative paths
folders_to_backup = [
'/backup'
]
# Optional: Temporary folder to store archive before upload
# Default: '~/.cache/yrba'
temporary_folder = '/tmp/yrba'
# SFTP Settings (only used if remote string above is set to sftp protocol)
# if both public key path & password is defined, first the private key authentication is tried,
# and if that fails the password is tried next.
[sftp]
public_key_path = '/auth/id_ed25519.pub'
private_key_path = '/auth/id_ed25519'
private_key_password = 'my-super-secure-password'
password = 'my-super-secure-password'
# Optional: Enable SFTP compression
# Default: true
compression_enabled = true
# Optional: SFTP file buffer size in MiB
# Default: 128 MiB
file_buffer_size = "128 MiB"
# SMB Settings (only used if remote string above is set to smb protocol)
[smb]
# SMB user password
password = 'my-super-secure-password'
Tip: Use ' instead of " for the path strings in the file configuration.
' refers to a raw string in .toml files, which makes it allows the use of
certain special characters without escaping them. Especially useful when the
application runs on Windows due to the nature of Windows directory paths often
containing \ characters that would otherwise need to be escaped with another
backslash like \\.
The example file can be found in the root directory of the GitHub repository. https://github.com/lilith-roth/yrba/blob/main/config.example.toml
Explanation
remote
This configures the target to upload your backups to incl. path on the target system to which your backups will be uploaded.
It is intended to be written in a URL format.
Example: remote = 'sftp://user@127.0.0.1/path/to/my/backup/storage/directory'
Note: The password can be omitted if a private key is used for authentication
amount_of_backups_to_keep
This defines the amount of backups that will be kept on the remote server, older ones will be deleted.
Set this to 0 to never remove old backups.
Example: amount_of_backups_to_keep = 5
folders_to_backup
Configure the folders you want to back up here.
If a docker setup is used, set this to the folders that are mounted into your container.
Example:
folders_to_backup = [
'/backup',
'~/all-my-data'
]
Optional: temporary_folder
Default: ~/.cache/yrba If you would like to change the temporary folder YRBA
will use to archive your backups to, define them here.
Example: temporary_folder = '/tmp/yrba'
SFTP Options [sftp]
public_key_path
If SFTP private key authentication is used set this to the path of your public key.
pubkey_path = '~/.ssh/id_ed25519.pub'
private_key_path
If SFTP private key authentication is used set this to the path of your private key.
public_key_path = '~/.ssh/id_ed25519'
private_key_password
If SFTP private key authentication is used, and your private key is protected with a password, set the password for your key here.
public_key_path = '~/.ssh/id_ed25519'
password
If SFTP password authentication is used, enter the password of your user here.
password = 'my-super-secure-password'
compression_enabled
Optional: Enable SFTP compression Will enable compression for the SSH connection to reduce upload data size for the cost of CPU processing. Default: true
compression_enabled = true
file_buffer_size
Optional: SFTP file buffer size in MiB. Will parse any file size string given as
input, for example "64 KB". Default: 128 MiB
file_buffer_size = "128 MiB"
SMB Options [smb]
password
User of the smb user connecting to the remote storage system.
password = 'my-super-secure-password'