configure lxc scripts
This commit is contained in:
4
restic/restic-lxc/export-etc.sh
Normal file
4
restic/restic-lxc/export-etc.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
export RESTIC_PASSWORD="8ung1e1!"
|
||||
export RESTIC_REPOSITORY="/mnt/resticbackups/etc"
|
||||
4
restic/restic-lxc/export-home-akanealw.sh
Normal file
4
restic/restic-lxc/export-home-akanealw.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
export RESTIC_PASSWORD="8ung1e1!"
|
||||
export RESTIC_REPOSITORY="/mnt/resticbackups/home/akanealw"
|
||||
4
restic/restic-lxc/export-opt.sh
Normal file
4
restic/restic-lxc/export-opt.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
export RESTIC_PASSWORD="8ung1e1!"
|
||||
export RESTIC_REPOSITORY="/mnt/resticbackups/opt"
|
||||
4
restic/restic-lxc/export-root.sh
Normal file
4
restic/restic-lxc/export-root.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
export RESTIC_PASSWORD="8ung1e1!"
|
||||
export RESTIC_REPOSITORY="/mnt/resticbackups/root"
|
||||
12
restic/restic-lxc/install-restic-lxc.sh
Normal file
12
restic/restic-lxc/install-restic-lxc.sh
Normal 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/*
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export RESTIC_PASSWORD="8ung1e1!"
|
||||
|
||||
31
restic/restic-lxc/restic-lxc-backup.sh
Normal file
31
restic/restic-lxc/restic-lxc-backup.sh
Normal 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
|
||||
8
restic/restic-lxc/restic-lxc-init.sh
Normal file
8
restic/restic-lxc/restic-lxc-init.sh
Normal 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
|
||||
Reference in New Issue
Block a user