add restic
This commit is contained in:
parent
90ee8363a9
commit
257b40bb12
6 changed files with 34 additions and 8 deletions
1
.config/systemd/user/basic.target.wants/restic-backup.timer
Symbolic link
1
.config/systemd/user/basic.target.wants/restic-backup.timer
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
/home/cyryl/.config/systemd/user/restic-backup.timer
|
1
.config/systemd/user/default.target.wants/restic-backup.service
Symbolic link
1
.config/systemd/user/default.target.wants/restic-backup.service
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
/home/cyryl/.config/systemd/user/restic-backup.service
|
8
.config/systemd/user/restic-backup.service
Normal file
8
.config/systemd/user/restic-backup.service
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Restic backup service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=restic -p $HOME/.vault/restic-password-file -r sftp:fetcher@10.0.0.101:/mnt/data/backup-targets/ --exclude-file $HOME/.vault/restic-exclude --verbose backup $HOME/
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
10
.config/systemd/user/restic-backup.timer
Normal file
10
.config/systemd/user/restic-backup.timer
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Timer for restic-backup
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=2m
|
||||||
|
OnUnitInactiveSec=1d
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=basic.target
|
|
@ -53,7 +53,7 @@ RUN curl -sSL https://get.rvm.io | bash
|
||||||
RUN bash -c "source /etc/profile.d/rvm.sh && rvm install ruby --disable-binary"
|
RUN bash -c "source /etc/profile.d/rvm.sh && rvm install ruby --disable-binary"
|
||||||
|
|
||||||
# basic packages
|
# basic packages
|
||||||
RUN dnf -y --best --allowerasing install tmux atop zsh aria2 lm_sensors python3-pip whois curl pv terminator gsmartcontrol python-pip mercurial cmake glances dkms git xz util-linux-user dnf-automatic yum-utils util-linux-user archivemount redhat-rpm-config grub2 grub2-efi dracut dracut-tools fail2ban syncthing wget wireguard-dkms wireguard-tools parted lsscsi ksh dnf-plugins-core
|
RUN dnf -y --best --allowerasing install tmux atop zsh aria2 lm_sensors python3-pip whois curl pv terminator gsmartcontrol python-pip mercurial cmake glances dkms git xz util-linux-user dnf-automatic yum-utils util-linux-user archivemount redhat-rpm-config grub2 grub2-efi dracut dracut-tools fail2ban syncthing wget wireguard-dkms wireguard-tools parted lsscsi ksh dnf-plugins-core restic duply
|
||||||
|
|
||||||
# printing
|
# printing
|
||||||
RUN dnf -y --best --allowerasing install splix gutenprint-cups cups-bjnp
|
RUN dnf -y --best --allowerasing install splix gutenprint-cups cups-bjnp
|
||||||
|
|
20
fedora/up.sh
20
fedora/up.sh
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
sudo dnf -y groupinstall "C Development Tools and Libraries"
|
sudo dnf -y groupinstall "C Development Tools and Libraries"
|
||||||
sudo dnf -y groupinstall "Development Tools"
|
sudo dnf -y groupinstall "Development Tools"
|
||||||
|
|
||||||
|
@ -14,14 +16,9 @@ if [[ -z $NOUPGRADE ]]; then
|
||||||
sudo dnf -y upgrade --best --allowerasing
|
sudo dnf -y upgrade --best --allowerasing
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo dnf -y --best --allowerasing install tmux atop zsh firefox aria2 gajim lm_sensors freecad python3-pip qt5-qtbase-devel qt5-qtwebkit-devel whois curl pv terminator gsmartcontrol python-pip mercurial python3-devel libxslt-devel libjpeg-turbo-devel cmake gtk2-devel intltool gparted glances dkms kernel-devel gimp git xz util-linux-user dnf-automatic kdiff3 yum-utils util-linux-user ncurses-devel zeal qt5-linguist qtkeychain-qt5-devel archivemount keepass splix gutenprint-cups cups-bjnp golang redhat-rpm-config pcsc-lite-devel pcsc-tools pcsc-lite yubico-piv-tool yubikey-personalization-gui xloadimage yp-tools closure-compiler optipng jpegoptim grub2 grub2-efi dracut dracut-tools openssl-devel fail2ban syncthing ansible gnome-tweaks xclip wget wireguard-dkms wireguard-tools lldb python-lldb kdbg zlib-devel libuuid-devel libattr-devel libblkid-devel libselinux-devel libudev-devel parted lsscsi ksh openssl-devel elfutils-libelf-devel libtirpc-devel kernel-devel ffmpeg-libs dnf-plugins-core
|
sudo dnf -y --best --allowerasing install tmux atop zsh firefox aria2 gajim lm_sensors freecad python3-pip qt5-qtbase-devel qt5-qtwebkit-devel whois curl pv terminator gsmartcontrol python-pip mercurial python3-devel libxslt-devel libjpeg-turbo-devel cmake gtk2-devel intltool gparted glances dkms kernel-devel gimp git xz util-linux-user dnf-automatic kdiff3 yum-utils util-linux-user ncurses-devel zeal qt5-linguist qtkeychain-qt5-devel archivemount keepass splix gutenprint-cups cups-bjnp golang redhat-rpm-config pcsc-lite-devel pcsc-tools pcsc-lite yubico-piv-tool yubikey-personalization-gui xloadimage yp-tools closure-compiler optipng jpegoptim grub2 grub2-efi dracut dracut-tools openssl-devel fail2ban syncthing ansible gnome-tweaks xclip wget wireguard-dkms wireguard-tools lldb python-lldb kdbg zlib-devel libuuid-devel libattr-devel libblkid-devel libselinux-devel libudev-devel parted lsscsi ksh openssl-devel elfutils-libelf-devel libtirpc-devel kernel-devel ffmpeg-libs dnf-plugins-core restic duply
|
||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
sudo dnf remove -y docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine
|
|
||||||
|
|
||||||
sudo dnf config-manager -y --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
|
sudo dnf config-manager -y --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
|
||||||
|
|
||||||
sudo dnf install -y docker-ce docker-ce-cli containerd.io
|
sudo dnf install -y docker-ce docker-ce-cli containerd.io
|
||||||
|
|
||||||
sudo cp -v /etc/dnf/automatic.conf /etc/dnf/automatic.conf.bak
|
sudo cp -v /etc/dnf/automatic.conf /etc/dnf/automatic.conf.bak
|
||||||
|
@ -57,6 +54,12 @@ else
|
||||||
echo "No grub.cfg ..."
|
echo "No grub.cfg ..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$HOME/.config/systemd/"
|
||||||
|
rm -frv "$HOME/.config/systemd/user"
|
||||||
|
|
||||||
|
DIR=`realpath "$DIR/../"`
|
||||||
|
ln -vfs "$DIR/.config/systemd/user" "$HOME/.config/systemd/"
|
||||||
|
|
||||||
if [[ -z $NO_SYSTEMCTL ]]; then
|
if [[ -z $NO_SYSTEMCTL ]]; then
|
||||||
sudo systemctl enable docker
|
sudo systemctl enable docker
|
||||||
sudo systemctl restart docker
|
sudo systemctl restart docker
|
||||||
|
@ -67,6 +70,10 @@ if [[ -z $NO_SYSTEMCTL ]]; then
|
||||||
sudo systemctl enable fstrim.timer
|
sudo systemctl enable fstrim.timer
|
||||||
sudo systemctl restart fstrim.timer
|
sudo systemctl restart fstrim.timer
|
||||||
sudo systemctl enable --now syncthing@cyryl.service
|
sudo systemctl enable --now syncthing@cyryl.service
|
||||||
|
systemctl --user daemon-reload
|
||||||
|
systemctl --user enable restic-backup.timer
|
||||||
|
systemctl --user enable restic-backup.service
|
||||||
|
systemctl --user list-timers
|
||||||
sudo systemctl list-timers
|
sudo systemctl list-timers
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -89,6 +96,5 @@ if [ "$(id -u)" != "0" ]; then
|
||||||
code --install-extension vscodevim.vim
|
code --install-extension vscodevim.vim
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DIR="$DIR/../"
|
|
||||||
DIR="$DIR" $DIR/common/configure_fresh_system.sh
|
DIR="$DIR" $DIR/common/configure_fresh_system.sh
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue