.gitignore and snapper configs

This commit is contained in:
Tobias J. Endres 2025-02-15 04:19:18 +01:00
commit 8e33cea1fd
5 changed files with 373 additions and 0 deletions

128
.gitignore vendored Normal file
View File

@ -0,0 +1,128 @@
# Ignore sensitive files
shadow
gshadow
sudoers
ssh/ssh_host_*_key
# Ignore system-specific files
fstab
mtab
adjtime
machine-id
# Ignore temporary or cache files
*.cache
*.tmp
*.swp
# Ignore log files
*.log
# Ignore directories with dynamic or system-specific data
/network/
/init.d/
/rc.d/
/udev/
/default/
/security/
# Ignore files related to package management
/apt/
/dpkg/
# Ignore files related to specific services
/postfix/
/samba/
/cups/
# Ignore files related to user management
/passwd
/group
# Ignore files related to time configuration
/localtime
/timezone
# Ignore files related to hardware configuration
/modprobe.d/
/modules-load.d/
# Ignore files related to boot configuration
/grub.d/
/initramfs-tools/
# Ignore files related to X11 configuration
/X11/
# Ignore files related to systemd
/systemd/
/sysctl.d/
# Ignore files related to specific applications
/mysql/
/php/
/nginx/
/apache2/
# Ignore files related to SSL/TLS
/ssl/
/pki/
# Ignore files related to cron jobs
/cron.d/
/cron.daily/
/cron.hourly/
/cron.monthly/
/cron.weekly/
# Ignore files related to mail configuration
/mail/
/postfix/
# Ignore files related to printer configuration
/cups/
/ppd/
# Ignore files related to network configuration
/network/
/netplan/
# Ignore files related to DNS configuration
/resolv.conf
/hosts
# Ignore files related to locale configuration
/locale.conf
/locale.gen
# Ignore files related to environment variables
/environment
/profile
# Ignore files related to specific hardware
/bluetooth/
/modprobe.d/
# Ignore files related to specific services
/avahi/
/dbus-1/
/systemd/
# Ignore files related to specific applications
/opt/
/snap/
/flatpak/
# Ignore files related to specific users
/skel/
/subuid
/subgid
# Ignore files related to specific hardware
/bluetooth/
/modprobe.d/
# Ignore files related to specific services
/avahi/
/dbus-1/
/systemd/

54
snap-pac.ini Normal file
View File

@ -0,0 +1,54 @@
# snap-pac example configuration file
# see snap-pac(8) for more details
# Each section corresponds with a snapper configuration. Add additional sections to add
# other configurations to be snapshotted. By default, only the root configuration is snapshotted.
# Create a section named [DEFAULT] to have a setting apply for all snapper configurations
## Uncomment to set parameters for snapper configuration named root
[systembackup]
## How many characters to limit the description for snapper.
## Default is 72
#desc_limit = 72
## Whether or not to take snapshots of this snapper configuration
## Default is True for root configuration and False for all other configurations
snapshot = True
## What snapper cleanup algorithm to use
## Default is number
#cleanup_algorithm = number
## Pre snapshot description.
## Default is the pacman command that triggered the hook
#pre_description = pacman pre snapshot root filesystem
## Post snapshot description.
## Default is the list of packages involved in the pacman transaction
#post_description = pacman post snapshot root filesystem
## Uncomment to add "important=yes" to userdata for snapshots referring to these packages
## Default is []
important_packages = ["linux", "linux-lts"]
## Uncomment to add "important=yes" to userdata for snapshots that were created with the following commands
## Default is []
important_commands = ["pacman -Syu"]
## Add custom userdata. Each key-value pair should be an item in the list
## Default is []
#userdata = ["key=value","foo=bar"]
## Example for another snapper configuration named "home"
[homebackup]
## Default is False
snapshot = True
## Pre snapshot description.
## Default is the pacman command that triggered the hook
#pre_description = pacman pre snapshot root filesystem
## Post snapshot description.
## Default is the list of packages involved in the pacman transaction
#post_description = pacman post snapshot root filesystem

View File

@ -0,0 +1,63 @@
# subvolume to snapshot
SUBVOLUME="/"
# filesystem type
FSTYPE="btrfs"
# btrfs qgroup for space aware cleanup algorithms
QGROUP=""
# fraction or absolute size of the filesystems space the snapshots may use
SPACE_LIMIT="0.5"
# fraction or absolute size of the filesystems space that should be free
FREE_LIMIT="0.2"
# users and groups allowed to work with config
ALLOW_USERS=""
ALLOW_GROUPS=""
# sync users and groups from ALLOW_USERS and ALLOW_GROUPS to .snapshots
# directory
SYNC_ACL="no"
# start comparing pre- and post-snapshot in background after creating
# post-snapshot
BACKGROUND_COMPARISON="yes"
# run daily number cleanup
NUMBER_CLEANUP="yes"
# limit for number cleanup
NUMBER_MIN_AGE="1800"
NUMBER_LIMIT="10"
NUMBER_LIMIT_IMPORTANT="5"
# create hourly snapshots
TIMELINE_CREATE="no"
# cleanup hourly snapshots after some time
TIMELINE_CLEANUP="yes"
# limits for timeline cleanup
TIMELINE_MIN_AGE="1800"
TIMELINE_LIMIT_HOURLY="5"
TIMELINE_LIMIT_DAILY="7"
TIMELINE_LIMIT_WEEKLY="0"
TIMELINE_LIMIT_MONTHLY="0"
TIMELINE_LIMIT_YEARLY="0"
# cleanup empty pre-post-pairs
EMPTY_PRE_POST_CLEANUP="yes"
# limits for empty pre-post-pair cleanup
EMPTY_PRE_POST_MIN_AGE="1800"

View File

@ -0,0 +1,64 @@
# subvolume to snapshot
SUBVOLUME="/home"
# filesystem type
FSTYPE="btrfs"
# btrfs qgroup for space aware cleanup algorithms
QGROUP=""
# fraction or absolute size of the filesystems space the snapshots may use
SPACE_LIMIT="0.5"
# fraction or absolute size of the filesystems space that should be free
FREE_LIMIT="0.2"
# users and groups allowed to work with config
ALLOW_USERS=""
ALLOW_GROUPS=""
# sync users and groups from ALLOW_USERS and ALLOW_GROUPS to .snapshots
# directory
SYNC_ACL="no"
# start comparing pre- and post-snapshot in background after creating
# post-snapshot
BACKGROUND_COMPARISON="yes"
# run daily number cleanup
NUMBER_CLEANUP="yes"
# limit for number cleanup
NUMBER_MIN_AGE="3600"
NUMBER_LIMIT="15"
NUMBER_LIMIT_IMPORTANT="10"
# create hourly snapshots
TIMELINE_CREATE="yes"
# cleanup hourly snapshots after some time
TIMELINE_CLEANUP="yes"
# limits for timeline cleanup
TIMELINE_MIN_AGE="3600"
TIMELINE_LIMIT_HOURLY="12"
TIMELINE_LIMIT_DAILY="12"
TIMELINE_LIMIT_WEEKLY="1"
TIMELINE_LIMIT_MONTHLY="1"
TIMELINE_LIMIT_QUARTERLY="0"
TIMELINE_LIMIT_YEARLY="0"
# cleanup empty pre-post-pairs
EMPTY_PRE_POST_CLEANUP="yes"
# limits for empty pre-post-pair cleanup
EMPTY_PRE_POST_MIN_AGE="3600"

View File

@ -0,0 +1,64 @@
# subvolume to snapshot
SUBVOLUME="/"
# filesystem type
FSTYPE="btrfs"
# btrfs qgroup for space aware cleanup algorithms
QGROUP=""
# fraction or absolute size of the filesystems space the snapshots may use
SPACE_LIMIT="0.5"
# fraction or absolute size of the filesystems space that should be free
FREE_LIMIT="0.2"
# users and groups allowed to work with config
ALLOW_USERS=""
ALLOW_GROUPS=""
# sync users and groups from ALLOW_USERS and ALLOW_GROUPS to .snapshots
# directory
SYNC_ACL="no"
# start comparing pre- and post-snapshot in background after creating
# post-snapshot
BACKGROUND_COMPARISON="yes"
# run daily number cleanup
NUMBER_CLEANUP="yes"
# limit for number cleanup
NUMBER_MIN_AGE="3600"
NUMBER_LIMIT="15"
NUMBER_LIMIT_IMPORTANT="10"
# create hourly snapshots
TIMELINE_CREATE="yes"
# cleanup hourly snapshots after some time
TIMELINE_CLEANUP="yes"
# limits for timeline cleanup
TIMELINE_MIN_AGE="3600"
TIMELINE_LIMIT_HOURLY="5"
TIMELINE_LIMIT_DAILY="2"
TIMELINE_LIMIT_WEEKLY="1"
TIMELINE_LIMIT_MONTHLY="1"
TIMELINE_LIMIT_QUARTERLY="0"
TIMELINE_LIMIT_YEARLY="1"
# cleanup empty pre-post-pairs
EMPTY_PRE_POST_CLEANUP="yes"
# limits for empty pre-post-pair cleanup
EMPTY_PRE_POST_MIN_AGE="3600"