From 425adadc7270eefb9033a50b6e4f5d371c2ec60a Mon Sep 17 00:00:00 2001 From: Dmitry <124861781+ada-dmitry@users.noreply.github.com> Date: Sat, 21 Feb 2026 16:18:55 +0300 Subject: [PATCH] =?UTF-8?q?feat(restic):=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D1=82=D1=8C=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D1=83?= =?UTF-8?q?=D1=80=D0=B0=D1=86=D0=B8=D1=8E=20=D0=B4=D0=BB=D1=8F=20=D1=80?= =?UTF-8?q?=D0=B5=D0=B7=D0=B5=D1=80=D0=B2=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BF=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=B8=20=D0=B8=D0=B3=D0=BD=D0=BE=D1=80=D0=B8=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=8F=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 + restic/.config/resticprofile/.resticignore | 99 +++++++++++++++++++ restic/.config/resticprofile/pass.txt | 1 + restic/.config/resticprofile/profiles.yaml | 106 +++++++++++++++++++++ 4 files changed, 209 insertions(+) create mode 100644 restic/.config/resticprofile/.resticignore create mode 100644 restic/.config/resticprofile/pass.txt create mode 100644 restic/.config/resticprofile/profiles.yaml diff --git a/.gitignore b/.gitignore index edcbf8a..9914b51 100644 --- a/.gitignore +++ b/.gitignore @@ -31,4 +31,7 @@ */.pid.lock */.sock +micro/.config/micro/backups/ +micro/.config/micro/buffers/ + diff --git a/restic/.config/resticprofile/.resticignore b/restic/.config/resticprofile/.resticignore new file mode 100644 index 0000000..bf5ae73 --- /dev/null +++ b/restic/.config/resticprofile/.resticignore @@ -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 diff --git a/restic/.config/resticprofile/pass.txt b/restic/.config/resticprofile/pass.txt new file mode 100644 index 0000000..860f55c --- /dev/null +++ b/restic/.config/resticprofile/pass.txt @@ -0,0 +1 @@ +?Holivarr588856 \ No newline at end of file diff --git a/restic/.config/resticprofile/profiles.yaml b/restic/.config/resticprofile/profiles.yaml new file mode 100644 index 0000000..67a152f --- /dev/null +++ b/restic/.config/resticprofile/profiles.yaml @@ -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 \ No newline at end of file