-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackup.conf
More file actions
119 lines (100 loc) · 3.6 KB
/
Copy pathbackup.conf
File metadata and controls
119 lines (100 loc) · 3.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# =================================================================
# Configuration for rsync Backup Script v0.36
# =================================================================
# !! IMPORTANT !! Set file permissions to 600 (chmod 600 backup.conf)
# --- Source and Destination ---
# List all source directories to back up, separated by spaces.
#
# IMPORTANT: Follow these two rules for each path:
# 1. End the path with a trailing slash (e.g., "user/").
# 2. Use "/./" to mark the part of the path you want to create on the destination.
# Example: "/home/./user/" will create a "user" directory in your BOX_DIR.
BACKUP_DIRS="/./home/user/ /./var/log/ /./etc/nginx/"
# The root folder on the remote server where backups will be placed.
# IMPORTANT: This path MUST end with a trailing slash (e.g., /backups/).
BOX_DIR="/home/myvps/"
# --- Connection Details ---
# The SSH address of your remote backup server (e.g., user@host).
BOX_ADDR="u123456-sub4@u123456.your-storagebox.de"
# Add each SSH option on a new line.
# For options taking a value, see the rules below.
BEGIN_SSH_OPTS
# Options with simple values (like a port) can be combined.
-p23
# Options that take a file path (like an identity key) MUST be on separate lines.
-i
/root/.ssh/id_ed25519
END_SSH_OPTS
# --- Performance ---
# Use --noatime for a potential performance boost.
# This requires rsync v3.3.0+ on BOTH the local and remote server.
# If your remote server (e.g., a storage box) has an older rsync, keep this to false.
RSYNC_NOATIME_ENABLED=false
# The timeout in seconds for rsync operations.
RSYNC_TIMEOUT=300
# Optional: Limit rsync's bandwidth usage in KiB/s. Leave empty or set to 0 to disable.
# Example: BANDWIDTH_LIMIT_KBPS=5000 (for 5 MB/s)
BANDWIDTH_LIMIT_KBPS=""
# --- Integrity Check ---
# Set to true to enable slow but thorough checksum-based integrity checks.
# Default is false for fast checks (based on file size and modification time).
CHECKSUM_ENABLED=false
# --- Logging ---
LOG_FILE="/var/log/backup_rsync.log"
# Max log size in Megabytes (MB) before the script rotates it.
MAX_LOG_SIZE_MB=10
# Delete rotated logs older than this many days.
LOG_RETENTION_DAYS=90
# --- Recycle Bin ---
# If enabled, files deleted from the source will be moved to a remote
# recycle bin instead of being permanently removed. This provides a safety net.
RECYCLE_BIN_ENABLED=true
# The name of the directory on the remote server to use as the recycle bin.
RECYCLE_BIN_DIR="recycle_bin"
# The number of days to keep daily backup folders in the recycle bin before deleting them.
RECYCLE_BIN_RETENTION_DAYS=30
# --- Notification Toggles ---
# Set to 'true' to enable, 'false' to disable.
NTFY_ENABLED=true
DISCORD_ENABLED=false
# --- ntfy Credentials ---
NTFY_TOKEN="tk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
NTFY_URL="https://ntfy.sh/your-private-topic-name"
# --- ntfy Notification Priorities ---
# 5=max/urgent, 4=high, 3=default, 2=low, 1=min
NTFY_PRIORITY_SUCCESS=3
NTFY_PRIORITY_WARNING=4
NTFY_PRIORITY_FAILURE=4
# --- Discord Credentials ---
DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/your/webhook_url_here"
# --- rsync Exclusions ---
# List all file/directory patterns to exclude below.
# The script will read everything between the BEGIN and END markers.
BEGIN_EXCLUDES
# Common cache,logs and temporary files
.cache/
/tmp/
*.tmp
*.bak
*.swp
*.log
# Specific application caches/dependencies
/node_modules/
/vendor/
__pycache__/
# System files that shouldn't be backed up
/lost+found/
.DS_Store
Thumbs.db
# Some common files which can be skipped
.bash_history
.bash_logout
.bashrc
.config/
.docker/
.local/
.profile
.ssh/
.sudo_as_admin_successful
.wget-hsts
END_EXCLUDES