From fad1faefe773884ab26403f15a53bf080fc18eb7 Mon Sep 17 00:00:00 2001 From: 4ndr0666 <97570105+4ndr0666@users.noreply.github.com> Date: Mon, 9 Dec 2024 20:26:44 -0600 Subject: [PATCH] Auto-commit: 0 added, 0 modified, 0 deleted --- .../test/{ => src}/install_env_maintenance.sh | 0 .../test/{ => src}/verify_environment.sh | 0 Install/{custom => }/abif/abif | 0 Install/{custom => }/abif/alacritty.toml | 0 Install/{custom => }/abif/english.trans | 0 .../blackarch/blackarch_desktopctl.sh | 0 .../blackarch/blackman_categories.sh | 0 .../archwiki_setup/60-dracut-remove.hook | 0 .../archwiki_setup/90-dracut-install.hook | 0 .../dracut/archwiki_setup/README.md | 0 .../dracut/archwiki_setup/dracut-install.sh | 0 .../dracut/archwiki_setup/dracut-remove.sh | 0 Install/{custom => }/dracut/dracut-install | 0 Install/{custom => }/dracut/dracut-remove | 0 .../dracut/dracut_custom_modules.sh | 0 Install/{custom => }/dracut/dracutmaster.sh | 0 Install/{custom => }/dracut/makedracut-hooks | 0 .../{custom => }/dracut/makedracuthooks.go | 0 Install/{custom => }/earlyoom/trigger_oom.sh | 0 Install/{custom => }/ffmpeg/README.md | 0 .../ffmpeg/custom_garuda_update.sh | 0 Install/{custom => }/ffmpeg/ffmpeg.conf | 0 .../ffmpeg/handle_ffmpeg_git_update.sh | 0 .../ffmpeg/install_ffmpeg-svp-mpv-vsp.sh | 0 .../ffmpeg/mpv-build-git_PKGBUILD | 0 .../{custom => }/hugo/hugo_theme_creator.sh | 0 .../install_graphics.sh | 0 .../intel_graphics/intelGPU_complete_guide.md | 135 ++++++++++ .../{custom => }/nvm/install-node-with-nvm.sh | 0 Install/{custom => }/poetry/makepoetry | 0 Install/rsnapshot/excluded_dir.txt | 32 +++ .../rsnapshot-interval.timer | 10 + .../sysd_service_file/rsnapshot@.service | 8 + Install/{custom => }/scrapy/imagecrawler.py | 0 Install/{custom => }/scrapy/trash/make_scrapy | 0 Install/{custom => }/setup_utility_drive.sh | 0 Install/{custom => }/svp/installsvp.sh | 0 Install/{custom => }/svp/svpsetup.sh | 0 Install/{custom => }/ventoy/ventoy.json | 0 Install/{custom => }/vim-tutor/vim-tutor.txt | 0 Install/{custom => }/vim-tutor/vim_tutor.vim | 0 Install/{custom => }/zram/zram.sh | 0 Install/{custom => }/zram/zram_setup.py | 0 Install/{custom => }/zsh/fancy-prompts.zsh | 0 Maintain/backup/rsnapshot/README.MD | 80 ++++++ Maintain/backup/rsnapshot/excluded_dir.txt | 32 +++ .../backup/rsnapshot/rsnapshot-daily.timer | 10 + .../backup/rsnapshot/rsnapshot-hourly.timer | 10 + .../backup/rsnapshot/rsnapshot-monthly.timer | 10 + .../backup/rsnapshot/rsnapshot-weekly.timer | 10 + Maintain/backup/rsnapshot/rsnapshot.conf | 249 ++++++++++++++++++ Maintain/backup/rsnapshot/rsnapshot@.service | 11 + 52 files changed, 597 insertions(+) rename 4ndr0tools/4ndr0service/test/{ => src}/install_env_maintenance.sh (100%) rename 4ndr0tools/4ndr0service/test/{ => src}/verify_environment.sh (100%) rename Install/{custom => }/abif/abif (100%) rename Install/{custom => }/abif/alacritty.toml (100%) rename Install/{custom => }/abif/english.trans (100%) rename Install/{custom => }/blackarch/blackarch_desktopctl.sh (100%) rename Install/{custom => }/blackarch/blackman_categories.sh (100%) rename Install/{custom => }/dracut/archwiki_setup/60-dracut-remove.hook (100%) rename Install/{custom => }/dracut/archwiki_setup/90-dracut-install.hook (100%) rename Install/{custom => }/dracut/archwiki_setup/README.md (100%) rename Install/{custom => }/dracut/archwiki_setup/dracut-install.sh (100%) rename Install/{custom => }/dracut/archwiki_setup/dracut-remove.sh (100%) rename Install/{custom => }/dracut/dracut-install (100%) rename Install/{custom => }/dracut/dracut-remove (100%) rename Install/{custom => }/dracut/dracut_custom_modules.sh (100%) rename Install/{custom => }/dracut/dracutmaster.sh (100%) rename Install/{custom => }/dracut/makedracut-hooks (100%) rename Install/{custom => }/dracut/makedracuthooks.go (100%) rename Install/{custom => }/earlyoom/trigger_oom.sh (100%) rename Install/{custom => }/ffmpeg/README.md (100%) rename Install/{custom => }/ffmpeg/custom_garuda_update.sh (100%) rename Install/{custom => }/ffmpeg/ffmpeg.conf (100%) rename Install/{custom => }/ffmpeg/handle_ffmpeg_git_update.sh (100%) rename Install/{custom => }/ffmpeg/install_ffmpeg-svp-mpv-vsp.sh (100%) rename Install/{custom => }/ffmpeg/mpv-build-git_PKGBUILD (100%) rename Install/{custom => }/hugo/hugo_theme_creator.sh (100%) rename Install/{custom => intel_graphics}/install_graphics.sh (100%) create mode 100644 Install/intel_graphics/intelGPU_complete_guide.md rename Install/{custom => }/nvm/install-node-with-nvm.sh (100%) rename Install/{custom => }/poetry/makepoetry (100%) create mode 100644 Install/rsnapshot/excluded_dir.txt create mode 100644 Install/rsnapshot/sysd_service_file/rsnapshot-interval.timer create mode 100644 Install/rsnapshot/sysd_service_file/rsnapshot@.service rename Install/{custom => }/scrapy/imagecrawler.py (100%) rename Install/{custom => }/scrapy/trash/make_scrapy (100%) rename Install/{custom => }/setup_utility_drive.sh (100%) rename Install/{custom => }/svp/installsvp.sh (100%) rename Install/{custom => }/svp/svpsetup.sh (100%) rename Install/{custom => }/ventoy/ventoy.json (100%) rename Install/{custom => }/vim-tutor/vim-tutor.txt (100%) rename Install/{custom => }/vim-tutor/vim_tutor.vim (100%) rename Install/{custom => }/zram/zram.sh (100%) rename Install/{custom => }/zram/zram_setup.py (100%) rename Install/{custom => }/zsh/fancy-prompts.zsh (100%) create mode 100644 Maintain/backup/rsnapshot/README.MD create mode 100644 Maintain/backup/rsnapshot/excluded_dir.txt create mode 100644 Maintain/backup/rsnapshot/rsnapshot-daily.timer create mode 100644 Maintain/backup/rsnapshot/rsnapshot-hourly.timer create mode 100644 Maintain/backup/rsnapshot/rsnapshot-monthly.timer create mode 100644 Maintain/backup/rsnapshot/rsnapshot-weekly.timer create mode 100644 Maintain/backup/rsnapshot/rsnapshot.conf create mode 100644 Maintain/backup/rsnapshot/rsnapshot@.service diff --git a/4ndr0tools/4ndr0service/test/install_env_maintenance.sh b/4ndr0tools/4ndr0service/test/src/install_env_maintenance.sh similarity index 100% rename from 4ndr0tools/4ndr0service/test/install_env_maintenance.sh rename to 4ndr0tools/4ndr0service/test/src/install_env_maintenance.sh diff --git a/4ndr0tools/4ndr0service/test/verify_environment.sh b/4ndr0tools/4ndr0service/test/src/verify_environment.sh similarity index 100% rename from 4ndr0tools/4ndr0service/test/verify_environment.sh rename to 4ndr0tools/4ndr0service/test/src/verify_environment.sh diff --git a/Install/custom/abif/abif b/Install/abif/abif similarity index 100% rename from Install/custom/abif/abif rename to Install/abif/abif diff --git a/Install/custom/abif/alacritty.toml b/Install/abif/alacritty.toml similarity index 100% rename from Install/custom/abif/alacritty.toml rename to Install/abif/alacritty.toml diff --git a/Install/custom/abif/english.trans b/Install/abif/english.trans similarity index 100% rename from Install/custom/abif/english.trans rename to Install/abif/english.trans diff --git a/Install/custom/blackarch/blackarch_desktopctl.sh b/Install/blackarch/blackarch_desktopctl.sh similarity index 100% rename from Install/custom/blackarch/blackarch_desktopctl.sh rename to Install/blackarch/blackarch_desktopctl.sh diff --git a/Install/custom/blackarch/blackman_categories.sh b/Install/blackarch/blackman_categories.sh similarity index 100% rename from Install/custom/blackarch/blackman_categories.sh rename to Install/blackarch/blackman_categories.sh diff --git a/Install/custom/dracut/archwiki_setup/60-dracut-remove.hook b/Install/dracut/archwiki_setup/60-dracut-remove.hook similarity index 100% rename from Install/custom/dracut/archwiki_setup/60-dracut-remove.hook rename to Install/dracut/archwiki_setup/60-dracut-remove.hook diff --git a/Install/custom/dracut/archwiki_setup/90-dracut-install.hook b/Install/dracut/archwiki_setup/90-dracut-install.hook similarity index 100% rename from Install/custom/dracut/archwiki_setup/90-dracut-install.hook rename to Install/dracut/archwiki_setup/90-dracut-install.hook diff --git a/Install/custom/dracut/archwiki_setup/README.md b/Install/dracut/archwiki_setup/README.md similarity index 100% rename from Install/custom/dracut/archwiki_setup/README.md rename to Install/dracut/archwiki_setup/README.md diff --git a/Install/custom/dracut/archwiki_setup/dracut-install.sh b/Install/dracut/archwiki_setup/dracut-install.sh similarity index 100% rename from Install/custom/dracut/archwiki_setup/dracut-install.sh rename to Install/dracut/archwiki_setup/dracut-install.sh diff --git a/Install/custom/dracut/archwiki_setup/dracut-remove.sh b/Install/dracut/archwiki_setup/dracut-remove.sh similarity index 100% rename from Install/custom/dracut/archwiki_setup/dracut-remove.sh rename to Install/dracut/archwiki_setup/dracut-remove.sh diff --git a/Install/custom/dracut/dracut-install b/Install/dracut/dracut-install similarity index 100% rename from Install/custom/dracut/dracut-install rename to Install/dracut/dracut-install diff --git a/Install/custom/dracut/dracut-remove b/Install/dracut/dracut-remove similarity index 100% rename from Install/custom/dracut/dracut-remove rename to Install/dracut/dracut-remove diff --git a/Install/custom/dracut/dracut_custom_modules.sh b/Install/dracut/dracut_custom_modules.sh similarity index 100% rename from Install/custom/dracut/dracut_custom_modules.sh rename to Install/dracut/dracut_custom_modules.sh diff --git a/Install/custom/dracut/dracutmaster.sh b/Install/dracut/dracutmaster.sh similarity index 100% rename from Install/custom/dracut/dracutmaster.sh rename to Install/dracut/dracutmaster.sh diff --git a/Install/custom/dracut/makedracut-hooks b/Install/dracut/makedracut-hooks similarity index 100% rename from Install/custom/dracut/makedracut-hooks rename to Install/dracut/makedracut-hooks diff --git a/Install/custom/dracut/makedracuthooks.go b/Install/dracut/makedracuthooks.go similarity index 100% rename from Install/custom/dracut/makedracuthooks.go rename to Install/dracut/makedracuthooks.go diff --git a/Install/custom/earlyoom/trigger_oom.sh b/Install/earlyoom/trigger_oom.sh similarity index 100% rename from Install/custom/earlyoom/trigger_oom.sh rename to Install/earlyoom/trigger_oom.sh diff --git a/Install/custom/ffmpeg/README.md b/Install/ffmpeg/README.md similarity index 100% rename from Install/custom/ffmpeg/README.md rename to Install/ffmpeg/README.md diff --git a/Install/custom/ffmpeg/custom_garuda_update.sh b/Install/ffmpeg/custom_garuda_update.sh similarity index 100% rename from Install/custom/ffmpeg/custom_garuda_update.sh rename to Install/ffmpeg/custom_garuda_update.sh diff --git a/Install/custom/ffmpeg/ffmpeg.conf b/Install/ffmpeg/ffmpeg.conf similarity index 100% rename from Install/custom/ffmpeg/ffmpeg.conf rename to Install/ffmpeg/ffmpeg.conf diff --git a/Install/custom/ffmpeg/handle_ffmpeg_git_update.sh b/Install/ffmpeg/handle_ffmpeg_git_update.sh similarity index 100% rename from Install/custom/ffmpeg/handle_ffmpeg_git_update.sh rename to Install/ffmpeg/handle_ffmpeg_git_update.sh diff --git a/Install/custom/ffmpeg/install_ffmpeg-svp-mpv-vsp.sh b/Install/ffmpeg/install_ffmpeg-svp-mpv-vsp.sh similarity index 100% rename from Install/custom/ffmpeg/install_ffmpeg-svp-mpv-vsp.sh rename to Install/ffmpeg/install_ffmpeg-svp-mpv-vsp.sh diff --git a/Install/custom/ffmpeg/mpv-build-git_PKGBUILD b/Install/ffmpeg/mpv-build-git_PKGBUILD similarity index 100% rename from Install/custom/ffmpeg/mpv-build-git_PKGBUILD rename to Install/ffmpeg/mpv-build-git_PKGBUILD diff --git a/Install/custom/hugo/hugo_theme_creator.sh b/Install/hugo/hugo_theme_creator.sh similarity index 100% rename from Install/custom/hugo/hugo_theme_creator.sh rename to Install/hugo/hugo_theme_creator.sh diff --git a/Install/custom/install_graphics.sh b/Install/intel_graphics/install_graphics.sh similarity index 100% rename from Install/custom/install_graphics.sh rename to Install/intel_graphics/install_graphics.sh diff --git a/Install/intel_graphics/intelGPU_complete_guide.md b/Install/intel_graphics/intelGPU_complete_guide.md new file mode 100644 index 0000000..4c0418c --- /dev/null +++ b/Install/intel_graphics/intelGPU_complete_guide.md @@ -0,0 +1,135 @@ +# Complete Building Guide For IntelGPUs + +--- + +**All Builds In This Guide**: + +1. Intel Gmmlib + +2. Libva + +3. Libva-Tools + +4. Intel VPL Dev Package + +5. Intel VPL-Tools + +**Dependencies**: + +```bash +sudo pacman -S autoconf libtool libdrm xorg xorg-dev openbox libx11-dev libgl1-mesa-glx git cmake pkg-config meson libdrm-dev automake libtool +``` + +**Firmware** (if needed): + +```bash +git clone git@github.com:intel-gpu/intel-gpu-firmware.git +cd intel-gpu-firmware +sudo mkdir -p /lib/modules/"$(uname -r)"/updates/i915/ +sudo cp firmware/*.bin /lib/modules/"$(uname -r)"/updates/i915/ +``` + +## Build Phase 1: + +### Intel Gmmlib + +This is the base component for the next component in the stack, the Intel Media Driver: + +```bash +git clone https://github.com/intel/gmmlib.git +cd gmmlib +mkdir build && cd build +cmake [-DCMAKE_BUILD_TYPE=Release | Debug | ReleaseInternal] .. +cmake -DCMAKE_BUILD_TYPE=Release .. +make -j"$(nproc)" +sudo make install +``` + +## Build Phase 2: + +### Libva + +```bash +git clone https://github.com/intel/libva.git +cd libva +mkdir build +cd build +meson .. -Dprefix=/usr -Dlibdir=/usr/lib/x86_64-linux-gnu +ninja +sudo ninja install +``` + +### Libva-Tools + +```bash +git clone https://github.com/intel/libva-utils.git +cd libva-utils +mkdir build +cd build +meson .. +ninja +sudo ninja install +``` + +Validate the environment with `vainfo`. The output should look similar to: + +```bash +sys@KBL:~/github/libva-utils$ vainfo +Trying display: drm +libva info: VA-API version 1.14.0 +libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so +libva info: Found init function __vaDriverInit_1_14 +libva info: va_openDriver() returns 0 +vainfo: VA-API version: 1.18 (libva 2.18.0.pre1) +vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.3.1 () +vainfo: Supported profile and entrypoints + VAProfileMPEG2Simple : VAEntrypointVLD + VAProfileMPEG2Main : VAEntrypointVLD + VAProfileH264Main : VAEntrypointVLD + VAProfileH264Main : VAEntrypointEncSliceLP + VAProfileH264High : VAEntrypointVLD + VAProfileH264High : VAEntrypointEncSliceLP + VAProfileJPEGBaseline : VAEntrypointVLD + VAProfileJPEGBaseline : VAEntrypointEncPicture + VAProfileH264ConstrainedBaseline: VAEntrypointVLD + VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP + VAProfileVP8Version0_3 : VAEntrypointVLD + VAProfileHEVCMain : VAEntrypointVLD + VAProfileHEVCMain10 : VAEntrypointVLD + VAProfileVP9Profile0 : VAEntrypointVLD + VAProfileVP9Profile2 : VAEntrypointVLD +``` + +**Explicitly set these environment variables**: + +```bash +export LIBVA_DRIVERS_PATH= +export LIBVA_DRIVER_NAME=iHD +``` + +## Build Phase 3 + +### Intel VPL Development Package + +```bash +git clone https://github.com/intel/libvpl +pushd libvpl +export VPL_INSTALL_DIR=`pwd`/../_vplinstall +sudo script/bootstrap +cmake -B _build -DCMAKE_INSTALL_PREFIX=$VPL_INSTALL_DIR +cmake --build _build +cmake --install _build +popd +``` + +### Intel VPL-Tools + +```bash +git clone https://github.com/intel/libvpl-tools +pushd libvpl-tools +export VPL_INSTALL_DIR=`pwd`/../_vplinstall +sudo script/bootstrap +cmake -B _build -DCMAKE_PREFIX_PATH=$VPL_INSTALL_DIR +cmake --build _build +cmake --install _build --prefix $VPL_INSTALL_DIR +``` diff --git a/Install/custom/nvm/install-node-with-nvm.sh b/Install/nvm/install-node-with-nvm.sh similarity index 100% rename from Install/custom/nvm/install-node-with-nvm.sh rename to Install/nvm/install-node-with-nvm.sh diff --git a/Install/custom/poetry/makepoetry b/Install/poetry/makepoetry similarity index 100% rename from Install/custom/poetry/makepoetry rename to Install/poetry/makepoetry diff --git a/Install/rsnapshot/excluded_dir.txt b/Install/rsnapshot/excluded_dir.txt new file mode 100644 index 0000000..efe3555 --- /dev/null +++ b/Install/rsnapshot/excluded_dir.txt @@ -0,0 +1,32 @@ +/23.1/* +/dev/* +/proc/* +/sys/* +/tmp/* +/run/* +/mnt/* +/media/* +/home/andro/Videos/* +/home/andro/Pictures/* +/home/andro/Downloads/* +/Nas/* +/storage/* +/4ndr0/* +/sto2/* +/home/andro/.cache/* +/home/andro/.borgmatic/* +/home/andro/.mozilla/* +/home/andro/dotnet/* +/home/andro/Avatars/* +/home/andro/ffmpeg_build/* +/home/andro/ffmpeg_sources/* +/home/andro/node_modules/* +/home/andro/Overrides/* +/home/andro/.npm/* +/home/andro/.vim/* +/home/andro/Dots~1~/* +/home/andro/.gphoto/* +/home/andro/.luarocks/* +/home/andro/nuget/* +/home/andro/mystiq_output/* +/home/andro/.config/BraveSoftware/* diff --git a/Install/rsnapshot/sysd_service_file/rsnapshot-interval.timer b/Install/rsnapshot/sysd_service_file/rsnapshot-interval.timer new file mode 100644 index 0000000..e2bfa12 --- /dev/null +++ b/Install/rsnapshot/sysd_service_file/rsnapshot-interval.timer @@ -0,0 +1,10 @@ +[Unit] +Description=rsnapshot hourly backup + +[Timer] +OnCalendar= +Persistent=true +Unit=rsnapshot@interval.service + +[Install] +WantedBy=timers.target diff --git a/Install/rsnapshot/sysd_service_file/rsnapshot@.service b/Install/rsnapshot/sysd_service_file/rsnapshot@.service new file mode 100644 index 0000000..fadb9d6 --- /dev/null +++ b/Install/rsnapshot/sysd_service_file/rsnapshot@.service @@ -0,0 +1,8 @@ +[Unit] +Description=rsnapshot (%I) backup + +[Service] +Type=oneshot +Nice=19 +IOSchedulingClass=idle +ExecStart=/usr/bin/rsnapshot %I diff --git a/Install/custom/scrapy/imagecrawler.py b/Install/scrapy/imagecrawler.py similarity index 100% rename from Install/custom/scrapy/imagecrawler.py rename to Install/scrapy/imagecrawler.py diff --git a/Install/custom/scrapy/trash/make_scrapy b/Install/scrapy/trash/make_scrapy similarity index 100% rename from Install/custom/scrapy/trash/make_scrapy rename to Install/scrapy/trash/make_scrapy diff --git a/Install/custom/setup_utility_drive.sh b/Install/setup_utility_drive.sh similarity index 100% rename from Install/custom/setup_utility_drive.sh rename to Install/setup_utility_drive.sh diff --git a/Install/custom/svp/installsvp.sh b/Install/svp/installsvp.sh similarity index 100% rename from Install/custom/svp/installsvp.sh rename to Install/svp/installsvp.sh diff --git a/Install/custom/svp/svpsetup.sh b/Install/svp/svpsetup.sh similarity index 100% rename from Install/custom/svp/svpsetup.sh rename to Install/svp/svpsetup.sh diff --git a/Install/custom/ventoy/ventoy.json b/Install/ventoy/ventoy.json similarity index 100% rename from Install/custom/ventoy/ventoy.json rename to Install/ventoy/ventoy.json diff --git a/Install/custom/vim-tutor/vim-tutor.txt b/Install/vim-tutor/vim-tutor.txt similarity index 100% rename from Install/custom/vim-tutor/vim-tutor.txt rename to Install/vim-tutor/vim-tutor.txt diff --git a/Install/custom/vim-tutor/vim_tutor.vim b/Install/vim-tutor/vim_tutor.vim similarity index 100% rename from Install/custom/vim-tutor/vim_tutor.vim rename to Install/vim-tutor/vim_tutor.vim diff --git a/Install/custom/zram/zram.sh b/Install/zram/zram.sh similarity index 100% rename from Install/custom/zram/zram.sh rename to Install/zram/zram.sh diff --git a/Install/custom/zram/zram_setup.py b/Install/zram/zram_setup.py similarity index 100% rename from Install/custom/zram/zram_setup.py rename to Install/zram/zram_setup.py diff --git a/Install/custom/zsh/fancy-prompts.zsh b/Install/zsh/fancy-prompts.zsh similarity index 100% rename from Install/custom/zsh/fancy-prompts.zsh rename to Install/zsh/fancy-prompts.zsh diff --git a/Maintain/backup/rsnapshot/README.MD b/Maintain/backup/rsnapshot/README.MD new file mode 100644 index 0000000..5d08b57 --- /dev/null +++ b/Maintain/backup/rsnapshot/README.MD @@ -0,0 +1,80 @@ +#### `rsnapshot-daily.timer` with a `OnCalendar` value: +```ini +[Unit] +Description=rsnapshot daily backup + +[Timer] +OnCalendar=daily +Persistent=true +Unit=rsnapshot@daily.service + +[Install] +WantedBy=timers.target +``` + +#### `rsnapshot-hourly.timer`: +```ini +[Unit] +Description=rsnapshot hourly backup + +[Timer] +OnCalendar=hourly +Persistent=true +Unit=rsnapshot@hourly.service + +[Install] +WantedBy=timers.target +``` + +#### `rsnapshot-monthly.timer`: +```ini +[Unit] +Description=rsnapshot monthly backup + +[Timer] +OnCalendar=monthly +Persistent=true +Unit=rsnapshot@monthly.service + +[Install] +WantedBy=timers.target +``` + +#### `rsnapshot-weekly.timer`: +```ini +[Unit] +Description=rsnapshot weekly backup + +[Timer] +OnCalendar=weekly +Persistent=true +Unit=rsnapshot@weekly.service + +[Install] +WantedBy=timers.target +``` + +### Steps to Apply Fixes: + +1. **Enable and Start Timers**: + Enable and start the timers: + ```bash + sudo systemctl enable rsnapshot-daily.timer + sudo systemctl enable rsnapshot-hourly.timer + sudo systemctl enable rsnapshot-monthly.timer + sudo systemctl enable rsnapshot-weekly.timer + + sudo systemctl start rsnapshot-daily.timer + sudo systemctl start rsnapshot-hourly.timer + sudo systemctl start rsnapshot-monthly.timer + sudo systemctl start rsnapshot-weekly.timer + ``` + +4. **Verify Timer Status**: + Check if the timers are running: + ```bash + sudo systemctl status rsnapshot-daily.timer + sudo systemctl status rsnapshot-hourly.timer + sudo systemctl status rsnapshot-monthly.timer + sudo systemctl status rsnapshot-weekly.timer + ``` diff --git a/Maintain/backup/rsnapshot/excluded_dir.txt b/Maintain/backup/rsnapshot/excluded_dir.txt new file mode 100644 index 0000000..efe3555 --- /dev/null +++ b/Maintain/backup/rsnapshot/excluded_dir.txt @@ -0,0 +1,32 @@ +/23.1/* +/dev/* +/proc/* +/sys/* +/tmp/* +/run/* +/mnt/* +/media/* +/home/andro/Videos/* +/home/andro/Pictures/* +/home/andro/Downloads/* +/Nas/* +/storage/* +/4ndr0/* +/sto2/* +/home/andro/.cache/* +/home/andro/.borgmatic/* +/home/andro/.mozilla/* +/home/andro/dotnet/* +/home/andro/Avatars/* +/home/andro/ffmpeg_build/* +/home/andro/ffmpeg_sources/* +/home/andro/node_modules/* +/home/andro/Overrides/* +/home/andro/.npm/* +/home/andro/.vim/* +/home/andro/Dots~1~/* +/home/andro/.gphoto/* +/home/andro/.luarocks/* +/home/andro/nuget/* +/home/andro/mystiq_output/* +/home/andro/.config/BraveSoftware/* diff --git a/Maintain/backup/rsnapshot/rsnapshot-daily.timer b/Maintain/backup/rsnapshot/rsnapshot-daily.timer new file mode 100644 index 0000000..28f9538 --- /dev/null +++ b/Maintain/backup/rsnapshot/rsnapshot-daily.timer @@ -0,0 +1,10 @@ +[Unit] +Description=rsnapshot daily backup + +[Timer] +OnCalendar=daily +Persistent=true +Unit=rsnapshot@daily.service + +[Install] +WantedBy=timers.target diff --git a/Maintain/backup/rsnapshot/rsnapshot-hourly.timer b/Maintain/backup/rsnapshot/rsnapshot-hourly.timer new file mode 100644 index 0000000..0359c5d --- /dev/null +++ b/Maintain/backup/rsnapshot/rsnapshot-hourly.timer @@ -0,0 +1,10 @@ +[Unit] +Description=rsnapshot hourly backup + +[Timer] +OnCalendar=hourly +Persistent=true +Unit=rsnapshot@hourly.service + +[Install] +WantedBy=timers.target diff --git a/Maintain/backup/rsnapshot/rsnapshot-monthly.timer b/Maintain/backup/rsnapshot/rsnapshot-monthly.timer new file mode 100644 index 0000000..7581f80 --- /dev/null +++ b/Maintain/backup/rsnapshot/rsnapshot-monthly.timer @@ -0,0 +1,10 @@ +[Unit] +Description=rsnapshot monthly backup + +[Timer] +OnCalendar=monthly +Persistent=true +Unit=rsnapshot@monthly.service + +[Install] +WantedBy=timers.target diff --git a/Maintain/backup/rsnapshot/rsnapshot-weekly.timer b/Maintain/backup/rsnapshot/rsnapshot-weekly.timer new file mode 100644 index 0000000..2acd13f --- /dev/null +++ b/Maintain/backup/rsnapshot/rsnapshot-weekly.timer @@ -0,0 +1,10 @@ +[Unit] +Description=rsnapshot weekly backup + +[Timer] +OnCalendar=weekly +Persistent=true +Unit=rsnapshot@weekly.service + +[Install] +WantedBy=timers.target diff --git a/Maintain/backup/rsnapshot/rsnapshot.conf b/Maintain/backup/rsnapshot/rsnapshot.conf new file mode 100644 index 0000000..84d12a0 --- /dev/null +++ b/Maintain/backup/rsnapshot/rsnapshot.conf @@ -0,0 +1,249 @@ +################################################# +# rsnapshot.conf - rsnapshot configuration file # +################################################# +# # +# PLEASE BE AWARE OF THE FOLLOWING RULE: # +# # +# This file requires tabs between elements # +# # +################################################# + +####################### +# CONFIG FILE VERSION # +####################### + +config_version 1.2 + +########################### +# SNAPSHOT ROOT DIRECTORY # +########################### + +# All snapshots will be stored under this root directory. +# +snapshot_root /Nas/Backups/rsnapshot/ + +# If no_create_root is enabled, rsnapshot will not automatically create the +# snapshot_root directory. This is particularly useful if you are backing +# up to removable media, such as a FireWire or USB drive. +# +#no_create_root 1 + +################################# +# EXTERNAL PROGRAM DEPENDENCIES # +################################# + +# LINUX USERS: Be sure to uncomment "cmd_cp". This gives you extra features. +# EVERYONE ELSE: Leave "cmd_cp" commented out for compatibility. +# +# See the README file or the man page for more details. +# +cmd_cp /usr/bin/cp + +# uncomment this to use the rm program instead of the built-in perl routine. +# +cmd_rm /usr/bin/rm + +# rsync must be enabled for anything to work. This is the only command that +# must be enabled. +# +cmd_rsync /usr/bin/rsync + +# Uncomment this to enable remote ssh backups over rsync. +# +#cmd_ssh /usr/bin/ssh + +# Comment this out to disable syslog support. +# +cmd_logger /usr/bin/logger + +# Uncomment this to specify the path to "du" for disk usage checks. +# If you have an older version of "du", you may also want to check the +# "du_args" parameter below. +# +cmd_du /usr/bin/du + +# Uncomment this to specify the path to rsnapshot-diff. +# +cmd_rsnapshot_diff /usr/bin/rsnapshot-diff + +# Specify the path to a script (and any optional arguments) to run right +# before rsnapshot syncs files +# +#cmd_preexec /path/to/preexec/script + +# Specify the path to a script (and any optional arguments) to run right +# after rsnapshot syncs files +# +#cmd_postexec /path/to/postexec/script + +# Paths to lvcreate, lvremove, mount and umount commands, for use with +# Linux LVMs. +# +#linux_lvm_cmd_lvcreate /path/to/lvcreate +#linux_lvm_cmd_lvremove /path/to/lvremove +#linux_lvm_cmd_mount /usr/bin/mount +#linux_lvm_cmd_umount /usr/bin/umount + +######################################### +# BACKUP LEVELS / INTERVALS # +# Must be unique and in ascending order # +# e.g. alpha, beta, gamma, etc. # +######################################### + +retain hourly 24 +retain daily 7 +retain weekly 4 +retain monthly 12 + +#retain alpha 6 +#retain beta 7 +#retain gamma 4 +#retain delta 3 + +############################################ +# GLOBAL OPTIONS # +# All are optional, with sensible defaults # +############################################ + +# Verbose level, 1 through 5. +# 1 Quiet Print fatal errors only +# 2 Default Print errors and warnings only +# 3 Verbose Show equivalent shell commands being executed +# 4 Extra Verbose Show extra verbose information +# 5 Debug mode Everything +# +verbose 2 + +# Same as "verbose" above, but controls the amount of data sent to the +# logfile, if one is being used. The default is 3. +# +loglevel 3 + +# If you enable this, data will be written to the file you specify. The +# amount of data written is controlled by the "loglevel" parameter. +# +#logfile /var/log/rsnapshot + +# If enabled, rsnapshot will write a lockfile to prevent two instances +# from running simultaneously (and messing up the snapshot_root). +# If you enable this, make sure the lockfile directory is not world +# writable. Otherwise anyone can prevent the program from running. +# +lockfile /var/run/rsnapshot.pid + +# By default, rsnapshot check lockfile, check if PID is running +# and if not, consider lockfile as stale, then start +# Enabling this stop rsnapshot if PID in lockfile is not running +# +#stop_on_stale_lockfile 0 + +# Default rsync args. All rsync commands have at least these options set. +# +#rsync_short_args -a +#rsync_long_args --delete --numeric-ids --relative --delete-excluded + +# ssh has no args passed by default, but you can specify some here. +# +#ssh_args -p 22 + +# Default arguments for the "du" program (for disk space reporting). +# The GNU version of "du" is preferred. See the man page for more details. +# If your version of "du" doesn't support the -h flag, try -k flag instead. +# +#du_args -csh + +# If this is enabled, rsync won't span filesystem partitions within a +# backup point. This essentially passes the -x option to rsync. +# The default is 0 (off). +# +#one_fs 0 + +# The include and exclude parameters, if enabled, simply get passed directly +# to rsync. If you have multiple include/exclude patterns, put each one on a +# separate line. Please look up the --include and --exclude options in the +# rsync man page for more details on how to specify file name patterns. +# +#include ??? +#include ??? +#exclude ??? +#exclude ??? + +# The include_file and exclude_file parameters, if enabled, simply get +# passed directly to rsync. Please look up the --include-from and +# --exclude-from options in the rsync man page for more details. +# +#include_file /path/to/include/file +exclude_file /usr/local/bin/excluded_dir.txt + +# If your version of rsync supports --link-dest, consider enabling this. +# This is the best way to support special files (FIFOs, etc) cross-platform. +# The default is 0 (off). +# +#link_dest 0 + +# When sync_first is enabled, it changes the default behaviour of rsnapshot. +# Normally, when rsnapshot is called with its lowest interval +# (i.e.: "rsnapshot alpha"), it will sync files AND rotate the lowest +# intervals. With sync_first enabled, "rsnapshot sync" handles the file sync, +# and all interval calls simply rotate files. See the man page for more +# details. The default is 0 (off). +# +#sync_first 0 + +# If enabled, rsnapshot will move the oldest directory for each interval +# to [interval_name].delete, then it will remove the lockfile and delete +# that directory just before it exits. The default is 0 (off). +# +#use_lazy_deletes 0 + +# Number of rsync re-tries. If you experience any network problems or +# network card issues that tend to cause ssh to fail with errors like +# "Corrupted MAC on input", for example, set this to a non-zero value +# to have the rsync operation re-tried. +# +#rsync_numtries 0 + +# LVM parameters. Used to backup with creating lvm snapshot before backup +# and removing it after. This should ensure consistency of data in some special +# cases +# +# LVM snapshot(s) size (lvcreate --size option). +# +#linux_lvm_snapshotsize 100M + +# Name to be used when creating the LVM logical volume snapshot(s). +# +#linux_lvm_snapshotname rsnapshot + +# Path to the LVM Volume Groups. +# +#linux_lvm_vgpath /dev + +# Mount point to use to temporarily mount the snapshot(s). +# +#linux_lvm_mountpath /path/to/mount/lvm/snapshot/during/backup + +############################### +### BACKUP POINTS / SCRIPTS ### +############################### + +# LOCALHOST +backup /home/andro/ theworkpc/ +backup /etc/ theworkpc/ +backup /usr/ theworkpc/ +backup /boot/ theworkpc/ +backup /root/ theworkpc/ +backup /opt/ theworkpc/ +backup /var/ theworkpc/ +#backup /var/log/rsnapshot localhost/ +#backup /etc/passwd localhost/ +#backup /home/foo/My Documents/ localhost/ +#backup /foo/bar/ localhost/ one_fs=1,rsync_short_args=-urltvpog +#backup_script /usr/local/bin/backup_pgsql.sh localhost/postgres/ +# You must set linux_lvm_* parameters below before using lvm snapshots +#backup lvm://vg0/xen-home/ lvm-vg0/xen-home/ + +# EXAMPLE.COM +#backup_exec /bin/date "+ backup of example.com started at %c" +#backup root@example.com:/home/ example.com/ +rsync_long_args=--bwlimit=16,exclude=core +#backup root@example.com:/etc/ example.com/ exclude=mtab,exclude diff --git a/Maintain/backup/rsnapshot/rsnapshot@.service b/Maintain/backup/rsnapshot/rsnapshot@.service new file mode 100644 index 0000000..3964be5 --- /dev/null +++ b/Maintain/backup/rsnapshot/rsnapshot@.service @@ -0,0 +1,11 @@ +[Unit] +Description=rsnapshot (%I) backup + +[Service] +Type=oneshot +Nice=19 +IOSchedulingClass=idle +ExecStart=/usr/bin/rsnapshot %I + +[Install] +WantedBy=multi-user.target