Skip to content

Commit 4d87bc9

Browse files
committed
add more service unit examples and template config
1 parent d17d26d commit 4d87bc9

File tree

2 files changed

+35
-9
lines changed

2 files changed

+35
-9
lines changed

backup.service

+6-4
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,20 @@ Wants=network-online.target
55

66
[Service]
77
Type=simple
8-
#ExecStart=/home/backuprs/bin/backuprs -v test
9-
ExecStart=/home/backuprs/bin/backuprs run
8+
#ExecStart=/home/backuprs/bin/backuprs test -j job --dry-run
9+
ExecStart=/home/backuprs/bin/backuprs daemon
10+
#ExecStart=/home/backuprs/bin/backuprs run -j job
1011
WorkingDirectory=/home/backuprs
1112
Nice=4
12-
#Restart=on-failure
13-
Restart=never
13+
Restart=on-failure
14+
#Restart=never
1415
User=backuprs
1516
Group=backuprs
1617

1718
PrivateDevices=yes
1819
PrivateTmp=yes
1920
ReadOnlyPaths=/
21+
# change the folders according to your scratch-dir
2022
ReadWritePaths=/home/backuprs/.cache /home/backuprs/scratchspace /tmp
2123
NoExecPaths=/
2224
ExecPaths=/usr/lib /usr/lib64 /home/backuprs/bin

config.toml.example

+29-5
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ restic_key = "<CHANGE ME>"
66
# Path to restic binary
77
restic_binary = "C:/restic_0.15.1_windows_amd64/restic_0.15.1_windows_amd64.exe"
88
# Default intervall for jobs in minutes
9-
default_interval = 86400
9+
default_interval = 720
1010
# Directory used for database files created during backup creation
1111
scratch_dir = "scratchdir"
1212

13-
# mysql dumb binary, if used for database backups
13+
# mysql dumb binary, if used for database backups, can be left blank if available in path
1414
# mysql_dumb_binary = "C:/Program Files/mysql/mysqldump.exe"
1515

16-
# postgres dumb binary, if used for database backups
16+
# postgres dumb binary, if used for database backups, can be left blank if available in path
1717
# postgres_dumb_binary = "C:/Program Files/PostgreSQL/14/bin/pg_dump.exe"
1818

1919
# [global.period]
@@ -26,13 +26,14 @@ scratch_dir = "scratchdir"
2626
# Rest-Server as backend
2727
[global.Rest]
2828
# URL for rest server to use for all jobs
29+
# only domain:port or ip:port
2930
rest_url = "example.com:443"
3031
server_pubkey_file = "C:/Users/Foo/pub_key"
3132

3233
# All backup jobs, start each one with [[jobs]]
3334
[[job]]
3435
# For referencing jobs in commands and output, also used as part of the database backup folder
35-
name = "My Backup Job"
36+
name = "Job1"
3637
# Command to run pre backup
3738
# pre_command = ""
3839
# Paths to include for backup
@@ -57,4 +58,27 @@ post_command_on_failure = false
5758
# Postgres Database backup
5859
# postgres_db = {database = "database", change_user = false, user = "user", password = "password"}
5960
# MySQL Database backup
60-
# mysql_db = "database"
61+
# mysql_db = "database"
62+
63+
# a second job, minimal required settings
64+
[[job]]
65+
name = "Job2"
66+
paths = ["C:/Users/Foo"]
67+
excludes = []
68+
user = "<CHANGE ME>"
69+
password = "<CHANGE ME>"
70+
repository_key = "<CHANGE ME>"
71+
repository = "<CHANGE ME>"
72+
post_command_on_failure = false
73+
74+
# third job, mysql backup only
75+
[[job]]
76+
name = "Job2"
77+
paths = []
78+
excludes = []
79+
user = "<CHANGE ME>"
80+
password = "<CHANGE ME>"
81+
repository_key = "<CHANGE ME>"
82+
repository = "<CHANGE ME>"
83+
mysql_db = "database"
84+
post_command_on_failure = false

0 commit comments

Comments
 (0)