configure lxc scripts

This commit is contained in:
2024-03-14 11:28:42 -05:00
parent 42c0bd6f39
commit e49bb4c8ac
8 changed files with 67 additions and 4 deletions

View File

@@ -0,0 +1,4 @@
#!/bin/bash
export RESTIC_PASSWORD="8ung1e1!"
export RESTIC_REPOSITORY="/mnt/resticbackups/etc"

View File

@@ -0,0 +1,4 @@
#!/bin/bash
export RESTIC_PASSWORD="8ung1e1!"
export RESTIC_REPOSITORY="/mnt/resticbackups/home/akanealw"

View File

@@ -0,0 +1,4 @@
#!/bin/bash
export RESTIC_PASSWORD="8ung1e1!"
export RESTIC_REPOSITORY="/mnt/resticbackups/opt"

View File

@@ -0,0 +1,4 @@
#!/bin/bash
export RESTIC_PASSWORD="8ung1e1!"
export RESTIC_REPOSITORY="/mnt/resticbackups/root"

View File

@@ -0,0 +1,12 @@
#!/bin/bash
mkdir -p /root/scripts/restic > /dev/null 2>&1
rm /root/scripts/restic/* > /dev/null 2>&1
wget -q http://192.168.1.50/scripts/restic/restic-lxc/restic-lxc-backup.sh -P /root/scripts/restic
wget -q http://192.168.1.50/scripts/restic/restic-lxc/export-etc.sh -P /root/scripts/restic
wget -q http://192.168.1.50/scripts/restic/restic-lxc/export-home-akanealw.sh -P /root/scripts/restic
wget -q http://192.168.1.50/scripts/restic/restic-lxc/export-opt.sh -P /root/scripts/restic
wget -q http://192.168.1.50/scripts/restic/restic-lxc/export-root.sh -P /root/scripts/restic
wget -q http://192.168.1.50/scripts/restic/restic-lxc/restic-lxc-init.sh -P /root/scripts/restic
chmod +x /root/scripts/restic/*

View File

@@ -1,4 +0,0 @@
#!/bin/bash
export RESTIC_PASSWORD="8ung1e1!"

View File

@@ -0,0 +1,31 @@
#!/bin/bash
export RESTIC_PASSWORD="8ung1e1!"
# backup /home/akanealw
export RESTIC_REPOSITORY="/mnt/resticbackups/home/akanealw"
restic unlock
restic backup /home/akanealw --no-cache -v
restic unlock
restic forget --keep-last 25 --prune
# backup /etc
export RESTIC_REPOSITORY="/mnt/resticbackups/etc"
restic unlock
restic backup /etc --no-cache -v
restic unlock
restic forget --keep-last 25 --prune
# backup /opt
export RESTIC_REPOSITORY="/mnt/resticbackups/opt"
restic unlock
restic backup /opt --no-cache -v
restic unlock
restic forget --keep-last 25 --prune
# backup /root
export RESTIC_REPOSITORY="/mnt/resticbackups/root"
restic unlock
restic backup /root --no-cache -v
restic unlock
restic forget --keep-last 25 --prune

View File

@@ -0,0 +1,8 @@
#!/bin/bash
export RESTIC_PASSWORD="8ung1e1!"
restic -r /mnt/resticbackups/home/akanealw init
restic -r /mnt/resticbackups/etc init
restic -r /mnt/resticbackups/opt init
restic -r /mnt/resticbackups/root init