feat(restic): добавить конфигурацию для резервного копирования и игнорирования файлов

This commit is contained in:
Dmitry
2026-02-21 16:18:55 +03:00
parent 9195cdb9e2
commit 425adadc72
4 changed files with 209 additions and 0 deletions
+3
View File
@@ -31,4 +31,7 @@
*/.pid.lock */.pid.lock
*/.sock */.sock
micro/.config/micro/backups/
micro/.config/micro/buffers/
@@ -0,0 +1,99 @@
# --- Зависимости (самое тяжелое) ---
venv/
.venv/
env/
node_modules/
vendor/
target/
bin/
obj/
.gradle/
.bundle/
site-packages/
# --- Python ---
__pycache__/
*.py[cod]
*$py.class
.pytest_cache/
.mypy_cache/
.hypothesis/
.tox/
.coverage/
htmlcov/
# --- Ruby ---
.rakeTasks
InstalledFiles
pkg/
spec/reports/
test/tmp/
*.gem
.ruby-version
# --- JavaScript / Node.js ---
.npm/
.eslintcache
.parcel-cache/
.next/
.nuxt/
dist/
build/
# --- Go ---
vendor/
*.o
*.a
# --- Rust ---
target/
Cargo.lock
# --- Java ---
*.class
*.jar
target/
# --- Системный мусор и IDE ---
.DS_Store
Thumbs.db
.idea/
.vscode/
*.sublime-project
*.sublime-workspace
.eclipse/
.gradle/
.mvn/
# --- Логи и временные файлы ---
*.log
*.tmp
*.bak
*.swp
*.swo
*~
.sass-cache/
.cache/
tmp/
temp/
# --- Системные каталоги ---
.Trash-*/
.trash/
lost+found/
# --- Браузеры и интернет ---
.mozilla/
.cache/google-chrome/
.cache/chromium/
# --- Виртуальные машины ---
.vagrant/
VirtualBox VMs/
# --- Прочее ---
.git/history
.git/refs/
*.lock
.env.local
.env.*.local
+1
View File
@@ -0,0 +1 @@
?Holivarr588856
+106
View File
@@ -0,0 +1,106 @@
default:
repository: "rclone:yadisk:System/Backups/ada-x1"
password-file: "/home/ada/.config/resticprofile/pass.txt"
exclude-file: "/home/ada/.config/resticprofile/.resticignore"
initialize: false
# Общие опции для всех backup команд
backup:
check-before: false # не проверять перед backup'ом для скорости
use-fs-snapshot: false
# Очистка старых снимков
forget:
group-by: "host,paths"
keep-last: 10
keep-daily: 7
keep-weekly: 4
keep-monthly: 6
prune: true
groups:
all:
- dotfiles
- projects
- vaults
- files
- pictures
schedule: "0 * * * *"
# Критичные данные - конфиги и dotfiles
dotfiles:
repository: "rclone:yadisk:System/Backups/ada-x1"
password-file: "/home/ada/.config/resticprofile/pass.txt"
backup:
source:
- /home/ada/.dotfiles
- /home/ada/.config
- /home/ada/.ssh
schedule: "*-*-* 0,6,12,18:00:00" # каждые 6 часов (0, 6, 12, 18)
retain:
keep-last: 28 # последние 28 часов
keep-daily: 30 # месячные
keep-monthly: 12 # год архивов
exclude:
- "**/.git"
- "**/node_modules"
- "**/__pycache__"
# Код и проекты - часто меняются
projects:
repository: "rclone:yadisk:System/Backups/ada-x1"
password-file: "/home/ada/.config/resticprofile/pass.txt"
backup:
source:
- /home/ada/Documents/Projects
schedule: "*-*-* *:15:00" # каждый час в 15 минут
retain:
keep-last: 24
keep-daily: 14
keep-monthly: 3
exclude:
- "**/.git"
- "**/node_modules"
- "**/.venv"
- "**/target"
# Важные данные
vaults:
repository: "rclone:yadisk:System/Backups/ada-x1"
password-file: "/home/ada/.config/resticprofile/pass.txt"
backup:
source:
- /home/ada/Documents/Vaults
schedule: "*-*-* *:30:00" # каждый час в 30 минут
retain:
keep-last: 12
keep-daily: 7
keep-monthly: 12
# Документы
files:
repository: "rclone:yadisk:System/Backups/ada-x1"
password-file: "/home/ada/.config/resticprofile/pass.txt"
backup:
source:
- /home/ada/Documents/Files
schedule: "*-*-* 02:15:00" # 02:15 каждый день
retain:
keep-daily: 30
keep-weekly: 12
keep-yearly: 1
# Фотографии и видео
pictures:
repository: "rclone:yadisk:System/Backups/ada-x1"
password-file: "/home/ada/.config/resticprofile/pass.txt"
backup:
source:
- /home/ada/Pictures
- /home/ada/Videos
schedule: "*-*-* 03:30:00" # 03:30 каждый день
retain:
keep-daily: 14
keep-weekly: 8
keep-monthly: 12
keep-yearly: 2