-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackup.example.toml
More file actions
60 lines (51 loc) · 1.42 KB
/
backup.example.toml
File metadata and controls
60 lines (51 loc) · 1.42 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
# Simple Example Configuration for Testing
# Copy this to backup.toml and customize for your needs
backup-dir = "./backup_${os}_${date}_${count}"
# Example 1: Simple file backup
[[tasks]]
src = ["~/.bashrc", "~/.zshrc"]
dest = "shell-config.7z"
# Example 2: Backup a directory without compression
[[tasks]]
src = ["~/Pictures/Wallpapers"]
dest = "wallpapers"
# Example 3: Linux-only backup
[[tasks]]
src = ["~/.config/i3"]
dest = "i3-config.7z"
os = ["linux", "archlinux"]
# Example 4: macOS-only backup
[[tasks]]
src = ["~/.config/aerospace"]
dest = "aerospace-config.7z"
os = ["darwin"]
# Example 5: Multiple sources to one archive
[[tasks]]
src = [
"~/.config/nvim",
"~/.config/alacritty",
"~/.tmux.conf"
]
dest = "dev-tools.7z"
# Example 6: With cleanup before backup
[[tasks]]
src = ["~/DEV/my-project"]
dest = "my-project.7z"
before-command = [
"find ~/DEV/my-project -name node_modules -type d -exec rm -rf {} +",
"find ~/DEV/my-project -name .git -type d -exec rm -rf {} +"
]
[[tasks]]
src = ["/tmp/archlinux_packages.txt"]
dest = "archlinux_packages.txt"
before-command = [
"pacman -Qenq > /tmp/archlinux_packages.txt && pacman -Qemq >> /tmp/archlinux_packages.txt",
]
os = ["archlinux"]
restore = false
filter-source = false
# Example 7: Command-only task (no src/dest). Run shell commands; skipped on restore.
# [[tasks]]
# type = "command"
# os = ["linux"]
# commands = ["echo 'custom sync or script here'"]