Incorporate changes for version 2.0

This commit is contained in:
2026-02-25 17:26:01 -05:00
parent 5fc3a3e901
commit a3f9fe3bdb
12 changed files with 1736 additions and 1274 deletions

View File

@@ -1,8 +0,0 @@
#!/bin/bash
log_path="/var/log/ribs"
log_fn="ribs_$(date +%Y%m%d%H%M%S).log"
/usr/local/bin/ribs > "$log_path"/"$log_fn" 2>&1

View File

@@ -20,17 +20,17 @@
# backed up. If not, the directory itself will be backed up.
# NOTE: Special characters must be escaped with backslashes!
#
source_dir=/var/www/
#source_dir=/var/www/
#
# Backup root directory - The directory on the backup storage where the
# backups are stored. For offline storage, this is the mount point of
# the backup drive filesystem. For remote storage, this is the path on
# the remote server. Must be writable to user running ribs. This must
# the remote server. Must be writable to user running RIBS. This must
# be an absolute, not a relative path. Directories named as the date
# of the backups will be created here containing the backed up files.
# NOTE: Special characters must be escaped with backslashes!
#
backup_root=/mnt/incremental_backup_dir
#backup_root=/mnt/incremental_backup_dir
#
# Backup subdirectory - A subdirectory of backup_root in which to store
# the backup date directories. If this is not set, the date
@@ -52,7 +52,7 @@ backup_root=/mnt/incremental_backup_dir
# complete, directories with dates older than this limit will be
# deleted.
#
day_limit=90
#day_limit=90
#
# Storage type - Where the backups are to be stored. Only one of the
# three options should be specified. Set the option you want, then
@@ -63,11 +63,15 @@ day_limit=90
# offline - Back up to offline storage that must be mounted. Can be
# anything that you can mount and unmount, including a filesystem
# on a local block device or a remote NFS or CIFS/SMB share.
# NOTE: To use offline storage, you must have superuser privileges
# in order to mount and unmount the device. RIBS will abort if you
# set storage_type to offline and you are not running as root or
# with sudo.
# remote - Back up to a remote system directly via rsync. If you use
# this, you must define remote_user_host below and setup pubkey
# authentication vi ssh for the remote user and host.
#
storage_type=remote
#storage_type=remote
#
@@ -81,22 +85,26 @@ storage_type=remote
[offline]
# Options for offline storage type
#
# Options in this section are required if storage_type above is set
# to offline. Otherwise, they are ignored.
#
# Mount parameters - Storage filesystem mount parameters. Should be what
# you'd type on the command line between the word "mount" and the
# mountpoint. See the manual page for the mount command (man 8 mount)
# for the available options.
# for the available options. If this is blank ("") or not defined,
# RIBS will attempt to mount backup_root, defined above in the
# [General] section, with no parameters, hoping that it is listed in
# /etc/fstab (man 5 fstab). You must run RIBS with superuser
# privileges for the offline storage type to work, since it requires
# mounting and unmounting filesystems.
#
mount_parameters=-t ext4 -U 433a2e61-25aa-4da5-a7c7-4d730a5793e7
#mount_parameters=-t ext4 -U 433a2e61-25aa-4da5-a7c7-4d730a5793e7
#mount_parameters="-t nfs nfsserver:/srv/ribs-backups"
#mount_parameters="/dev/sdc1"
#
# Remount read-only - Set this to True if storage should be remounted in
# read-only mode when not being used for backups, False if not.
# read-only mode when not being used for backups, False if not. If
# blank ("") or not defined, the default is False.
#
remount_ro=True
#remount_ro=True
#
[remote]
@@ -112,5 +120,5 @@ remount_ro=True
# usually done with the ssh-copy-id command, which also takes care of
# adding the host's key fingerprint to the local known_hosts file.
#
remote_user_host=user@backupserver
#remote_user_host=user@backupserver
#

View File

@@ -1,124 +0,0 @@
# Configuration file for Rod's Incremental Backup System
# Version 1.3.2
# ************************** General Options ***************************
#
# All of the options in the genera options section must be defined.
#
# ********************
# Dry run - Set to false for normal mode or true for testing.
#
DRY_RUN=true
#
# ********************
# Source directory - The directory where files to be backed up are
# located. This must be an absolute, not a relative path. If the
# trailing slash is included, the contents of the directory will be
# backed up. If not, the directory itself will be backed up.
# NOTE: Special characters must be escaped with backslashes!
#
SRC="/var/www/"
#
# ********************
# Backup root directory - The directory on the backup storage where the
# backups are stored. For OFFLINE storage, this is the mount point of
# the backup drive filesystem. For REMOTE storage, this is the path on
# the remote server. Must be writable to user running ribs. This must
# be an absolute, not a relative path. Directories named as the date
# of the backups will be created here containing the backed up files.
# NOTE: Special characters must be escaped with backslashes!
#
BACKUP_ROOT="/mnt/incremental_backup_dir"
#
# ********************
# Backup subdirectory - A subdirectory of BACKUP_ROOT in which to store
# the backup date directories. To just put the date directories
# directly in BACKUP_ROOT, set this to blank ("").
# NOTE: Special characters must be escaped with backslashes!
#
BACKUP_SUBDIR=""
#BACKUP_SUBDIR="/main"
#
# ********************
# Exclude list - List of file patterns to exclude, separated by
# newlines. Anything in the source directory that matches a pattern in
# this list will not be backed up. If you don't want to exclude
# anything from the backup, set this to blank ("").
# NOTE: Special characters must be escaped with backslashes unless
# they represent a wildcard in a pattern!
#
EXCLUDE_LIST=""
#EXCLUDE_LIST="
#DatabaseBackups-*
#somehugedir
#secretstuff
#"
#
# ********************
# Day limit - The number of days of backups to keep. When the backup is
# complete, directories with dates older than this limit will be
# deleted.
#
DAY_LMT=90
#
# ********************
# Storage type - Where the backups are to be stored. Only one of the
# three options should be specified. Set the option you want, then
# refer to the appropriate section below for that specific
# configuration. Possible values are:
# LOCAL - Back up to a local directory. Can also be anything already
# mounted on the local filesystem.
# OFFLINE - Back up to offline storage that must be mounted. Can be
# anything that you can mount and unmount, including a filesystem
# on a local block device or a remote NFS or CIFS/SMB share.
# REMOTE - Back up to a remote system directly via rsync. If you use
# this, you must define REMOTE_USER_HOST below and setup pubkey
# authentication vi ssh for the remote user and host.
#
STORAGE_TYPE="REMOTE"
#
# **********************************************************************
# ******************* Options for LOCAL storage type *******************
#
# There are no specific settings for the local storage type.
#
# **********************************************************************
# ****************** Options for OFFLINE storage type ******************
#
# Leave this entire section commented out for LOCAL or REMOTE storage.
#
# Mount parameters - Storage filesystem mount parameters. Should be what
# you'd type on the command line between the word "mount" and the
# mountpoint. See the manual page for the mount command (man 8 mount)
# for the available options.
#
#MOUNT_PARAMETERS="-t nfs nfsserver:/srv/ribs-backups"
#MOUNT_PARAMETERS="-t ext4 -U 433a2e61-25aa-4da5-a7c7-4d730a5793e7"
#MOUNT_PARAMETERS="/dev/sdc1"
#
# Remount read-only - Set this to true if storage should be remounted in
# read-only mode when not being used for backups.
#
#REMOUNT_RO=true
#REMOUNT_RO=false
#
# **********************************************************************
# ****************** Options for REMOTE storage type *******************
#
# Leave this entire section commented out for LOCAL or OFFLINE storage.
#
# Remote user and host - The user and host to connect to for backup
# storage. If you want RIBS to be able to run unattended, for example
# as a cron job, you will need to ensure that the user's ssh public
# key is listed in the remote host's authorized_keys file. This is
# usually done with the ssh-copy-id command, which also takes care of
# adding the host's key fingerprint to the local known_hosts file.
#
REMOTE_USER_HOST="user@backupserver"
#
# **********************************************************************