testing local scripts
This commit is contained in:
@@ -1,4 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
export RESTIC_PASSWORD="8ung1e1!"
|
|
||||||
|
|
||||||
4
restic/restic-local/export-etc.sh
Normal file
4
restic/restic-local/export-etc.sh
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export RESTIC_PASSWORD="8ung1e1!"
|
||||||
|
export RESTIC_REPOSITORY="/mnt/truenas-backups/resticbackups/changemepls/etc"
|
||||||
4
restic/restic-local/export-home-akanealw.sh
Normal file
4
restic/restic-local/export-home-akanealw.sh
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export RESTIC_PASSWORD="8ung1e1!"
|
||||||
|
export RESTIC_REPOSITORY="/mnt/truenas-backups/resticbackups/changemepls/home/akanealw"
|
||||||
4
restic/restic-local/export-opt.sh
Normal file
4
restic/restic-local/export-opt.sh
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export RESTIC_PASSWORD="8ung1e1!"
|
||||||
|
export RESTIC_REPOSITORY="/mnt/truenas-backups/resticbackups/changemepls/opt"
|
||||||
4
restic/restic-local/export-root.sh
Normal file
4
restic/restic-local/export-root.sh
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export RESTIC_PASSWORD="8ung1e1!"
|
||||||
|
export RESTIC_REPOSITORY="/mnt/truenas-backups/resticbackups/changemepls/root"
|
||||||
15
restic/restic-local/install-restic-local.sh
Normal file
15
restic/restic-local/install-restic-local.sh
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/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-local/restic-local-backup.sh
|
||||||
|
wget -q http://192.168.1.50/scripts/restic/restic-local/export-etc.sh
|
||||||
|
wget -q http://192.168.1.50/scripts/restic/restic-local/export-home-akanealw.sh
|
||||||
|
wget -q http://192.168.1.50/scripts/restic/restic-local/export-opt.sh
|
||||||
|
wget -q http://192.168.1.50/scripts/restic/restic-local/export-root.sh
|
||||||
|
wget -q http://192.168.1.50/scripts/restic/restic-local/restic-local-init.sh
|
||||||
|
|
||||||
|
mv /root/restic-local-* /root/scripts/restic
|
||||||
|
mv /root/export-* /root/scripts/restic
|
||||||
|
chmod +x /root/scripts/restic/*
|
||||||
|
sed -i "s/changemepls/$(cat /etc/hostname | tr '[:upper:]' '[:lower:]')/g" /root/scripts/restic/*
|
||||||
9
restic/restic-local/restic-init-local.sh
Normal file
9
restic/restic-local/restic-init-local.sh
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export RESTIC_PASSWORD="8ung1e1!"
|
||||||
|
|
||||||
|
restic -r /mnt/truenas-backups/resticbackups/changemepls/home/akanealw init
|
||||||
|
restic -r /mnt/truenas-backups/resticbackups/changemepls/etc init
|
||||||
|
restic -r /mnt/truenas-backups/resticbackups/changemepls/opt init
|
||||||
|
restic -r /mnt/truenas-backups/resticbackups/changemepls/root init
|
||||||
|
|
||||||
31
restic/restic-local/restic-local-backup.sh
Normal file
31
restic/restic-local/restic-local-backup.sh
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export RESTIC_PASSWORD="8ung1e1!"
|
||||||
|
|
||||||
|
# backup /home/akanealw
|
||||||
|
export RESTIC_REPOSITORY="/mnt/truenas-backups/resticbackups/changemepls/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/truenas-backups/resticbackups/changemepls/etc"
|
||||||
|
restic unlock
|
||||||
|
restic backup /etc --no-cache -v
|
||||||
|
restic unlock
|
||||||
|
restic forget --keep-last 25 --prune
|
||||||
|
|
||||||
|
# backup /opt
|
||||||
|
export RESTIC_REPOSITORY="/mnt/truenas-backups/resticbackups/changemepls/opt"
|
||||||
|
restic unlock
|
||||||
|
restic backup /opt --no-cache -v
|
||||||
|
restic unlock
|
||||||
|
restic forget --keep-last 25 --prune
|
||||||
|
|
||||||
|
# backup /root
|
||||||
|
export RESTIC_REPOSITORY="/mnt/truenas-backups/resticbackups/changemepls/root"
|
||||||
|
restic unlock
|
||||||
|
restic backup /root --no-cache -v
|
||||||
|
restic unlock
|
||||||
|
restic forget --keep-last 25 --prune
|
||||||
Reference in New Issue
Block a user