-
-
Save pbt001/ab29f5ff455820d7056bf2cc0dd9a96c to your computer and use it in GitHub Desktop.
Revisions
-
k9982874 revised this gist
Apr 16, 2020 . 1 changed file with 46 additions and 14 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,15 +10,14 @@ :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] # Keep all established connections -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A OUTPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT # Allow loopback interface (lo0) and drop all traffic to 127/8 that doesn't use lo0 -A INPUT -i lo -j ACCEPT -A OUTPUT -o lo -j ACCEPT # Drop Invalid Packets -A INPUT -m conntrack --ctstate INVALID -j DROP @@ -36,22 +35,18 @@ -A FORWARD -i ppp0 -o br0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A FORWARD -i br0 -o ppp0 -j ACCEPT # Forward for wireguard -A FORWARD -i ppp0 -o wg0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A FORWARD -i wg0 -o ppp0 -j ACCEPT # Allow ping and ICMP error returns. -A INPUT -p icmp -m conntrack --ctstate NEW --icmp-type 8 -j ACCEPT -A INPUT -p icmp -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT -A OUTPUT -p icmp -j ACCEPT # Allow ssh #-A INPUT -i ppp0 -p tcp --dport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT #-A OUTPUT -o ppp0 -p tcp --sport 22 -m conntrack --ctstate ESTABLISHED -j ACCEPT # Allow HTTP -A INPUT -i ppp0 -p tcp --dport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT @@ -61,20 +56,57 @@ -A INPUT -i ppp0 -p tcp --dport 443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT -A OUTPUT -o ppp0 -p tcp --sport 443 -m conntrack --ctstate ESTABLISHED -j ACCEPT # Allow gost proxy -A INPUT -i ppp0 -p tcp --dport 8388 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT -A OUTPUT -o ppp0 -p tcp --sport 8388 -m conntrack --ctstate ESTABLISHED -j ACCEPT # Allow Transmission Port -A INPUT -i ppp0 -p tcp --dport 51413 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT -A OUTPUT -o ppp0 -p tcp --sport 51413 -m conntrack --ctstate ESTABLISHED -j ACCEPT # Allow WireGuard port -A INPUT -i ppp0 -p udp --dport 51820 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT -A OUTPUT -o ppp0 -p udp --sport 51820 -m conntrack --ctstate ESTABLISHED -j ACCEPT # ydc #-A INPUT -i ppp0 -p tcp -m multiport --dport 1896,6881,6882,38894 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT #-A INPUT -i ppp0 -p udp -m multiport --dport 1896,6881,6882,38894 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT #-A OUTPUT -o ppp0 -p tcp -m multiport --sport 1896,6881,6882,38894 -m conntrack --ctstate ESTABLISHED -j ACCEPT #-A OUTPUT -o ppp0 -p udp -m multiport --sport 1896,6881,6882,38894 -m conntrack --ctstate ESTABLISHED -j ACCEPT #-A INPUT -i ppp0 -p tcp -m multiport --dport 9092 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT #-A OUTPUT -o ppp0 -p tcp -m multiport --sport 9092 -m conntrack --ctstate ESTABLISHED -j ACCEPT #-A INPUT -i ppp0 -p tcp --dport 51414 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT #-A OUTPUT -o ppp0 -p tcp --sport 51414 -m conntrack --ctstate ESTABLISHED -j ACCEPT # Drop all other traffic for external -A INPUT -i ppp0 -j DROP COMMIT *nat :PREROUTING ACCEPT [0:0] :INPUT ACCEPT [0:0] :OUTPUT ACCEPT [0:0] :POSTROUTING ACCEPT [0:0] -A POSTROUTING -o ppp0 -j MASQUERADE -A PREROUTING -d 127.0.0.1/24 -j RETURN -A PREROUTING -d 255.255.0.0/8 -j RETURN -A PREROUTING -d 224.0.0.0/4 -j RETURN -A PREROUTING -d 192.168.1.0/24 -j RETURN -A PREROUTING -d 10.8.0.0/24 -j RETURN # GFW list -A PREROUTING -p tcp -m set --match-set gfwlist dst -j REDIRECT --to-ports 1080 -A OUTPUT -p tcp -m set --match-set gfwlist dst -j REDIRECT --to-ports 1080 # ydc #-A PREROUTING -p tcp --dport 1896 -j DNAT --to-destination 192.168.1.107:1896 #-A PREROUTING -p tcp --dport 6881 -j DNAT --to-destination 192.168.1.107:6881 #-A PREROUTING -p tcp --dport 6882 -j DNAT --to-destination 192.168.1.107:6882 #-A PREROUTING -p tcp --dport 38894 -j DNAT --to-destination 192.168.1.107:38894 COMMIT -
k9982874 revised this gist
Jun 24, 2019 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +0,0 @@ -
k9982874 revised this gist
Jun 24, 2019 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ Empty File -
k9982874 revised this gist
Jun 19, 2019 . No changes.There are no files selected for viewing
-
k9982874 revised this gist
Jun 19, 2019 . No changes.There are no files selected for viewing
-
k9982874 revised this gist
Jun 19, 2019 . No changes.There are no files selected for viewing
-
k9982874 revised this gist
Jun 19, 2019 . No changes.There are no files selected for viewing
-
k9982874 revised this gist
May 20, 2019 . 1 changed file with 17 additions and 18 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,27 +1,26 @@ #!/bin/bash if [ -z "$RESTIC_REPOSITORY" ]; then echo "Please specify path for the restic repository" exit 0 fi if [ -z "$RESTIC_PASSWORD" ]; then echo "Please input password for the archive" exit 0 fi if [ -z "$MYSQL_USER" ]; then echo "Please specify user for the mysql" exit 0 fi if [ -z "$MYSQL_PASSWORD" ]; then echo "Please input password for the mysql" exit 0 fi mysqldump --opt --complete-insert --add-drop-database -u$MYSQL_USER -p$MYSQL_PASSWORD --databases nextcloud | restic backup --tag="nextcloud on mysql" --stdin --stdin-filename nextcloud.sql restic backup --tag="website" --exclude="lost+found" --one-file-system /mnt/data/web -
k9982874 revised this gist
May 20, 2019 . 1 changed file with 20 additions and 33 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,39 +1,26 @@ #!/bin/bash if [ -z "$RESTIC_REPOSITORY" ]; then echo "Please specify path for the restic repository" exit 0 fi if [ -z "$RESTIC_PASSWORD" ]; then echo "Please input password for the archive" exit 0 fi restic backup \ --exclude="/proc" \ --exclude="/tmp" \ --exclude="/mnt" \ --exclude="/dev" \ --exclude="/sys" \ --exclude="/run" \ --exclude="/media" \ --exclude="/var/log" \ --exclude="/var/cache" \ --exclude="lost+found" \ --exclude="*.sock" \ --one-file-system \ / -
k9982874 revised this gist
May 20, 2019 . 1 changed file with 17 additions and 18 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,27 +1,26 @@ #!/bin/bash if [ -z "$RESTIC_REPOSITORY" ]; then echo "Please specify path for the restic repository" exit 0 fi if [ -z "$RESTIC_PASSWORD" ]; then echo "Please input password for the archive" exit 0 fi if [ -z "$MYSQL_USER" ]; then echo "Please specify user for the mysql" exit 0 fi if [ -z "$MYSQL_PASSWORD" ]; then echo "Please input password for the mysql" exit 0 fi mysqldump --opt --complete-insert --add-drop-database -u$MYSQL_USER -p$MYSQL_PASSWORD --databases gitea | restic backup --tag="gitea on mysql" --stdin --stdin-filename gitea.sql restic backup --tag="source code" --exclude="lost+found" --one-file-system /mnt/data/gitea -
k9982874 revised this gist
May 20, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -39,4 +39,4 @@ select yn in "Yes" "No"; do Yes ) restore $PASS; break;; * ) exit;; esac done -
k9982874 renamed this gist
May 20, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
k9982874 revised this gist
May 20, 2019 . 1 changed file with 32 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,32 @@ #!/bin/bash if [ -z "$PASS" ]; then echo "Please setup password for the archive" exit 0 fi ROOT=/mnt/data/backups/archives SOURCE=/mnt/data/workspace archive () { NAME=$1 rm -f $ROOT/$NAME.log rm -f $ROOT/$NAME.tar.gz tar --exclude=/lost+found -P --one-file-system --use-compress-program pigz -cvpf - $SOURCE/$NAME 2> $ROOT/$NAME.log | \ openssl aes-256-cbc -pbkdf2 -out $ROOT/$NAME.tar.gz -pass pass:$PASS HASH=`md5sum $ROOT/$NAME.tar.gz | awk '{ print $1 }'` echo "HASH: $HASH" >> $ROOT/$NAME.log } archive chuntent archive kuna archive ourgame archive RGGame archive tynon archive wmss archive xunbaola archive gnues split -b 10G -d wmss.tar.gz wmss.tar.gz. -
k9982874 revised this gist
May 20, 2019 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ archive -
k9982874 revised this gist
May 15, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ START_AT=`date +%s` mysqldump --opt --complete-insert --add-drop-database -uroot -p111111 --databases gitea | \ openssl aes-256-cbc -pbkdf2 -out $ROOT/$DATE.sql -pass pass:$PASS tar --exclude=lost+found --one-file-system -P --use-compress-program pigz -cvpf - /mnt/data/gitea 2> $ROOT/$DATE.log | \ openssl aes-256-cbc -pbkdf2 -out $ROOT/$DATE.tar.gz -pass pass:$PASS HASH=`md5sum $ROOT/$DATE.tar.gz | awk '{ print $1 }'` -
k9982874 revised this gist
May 15, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,12 +16,12 @@ START_AT=`date +%s` mysqldump --opt --complete-insert --add-drop-database -uroot -p111111 --databases nextcloud | \ openssl aes-256-cbc -pbkdf2 -out $ROOT/$DATE.sql -pass pass:$PASS tar --exclude=lost+found -P --one-file-system --use-compress-program pigz -cvpf - /mnt/data/web 2> $ROOT/$DATE.log | \ openssl aes-256-cbc -pbkdf2 -out $ROOT/$DATE.tar.gz -pass pass:$PASS HASH=`md5sum $ROOT/$DATE.tar.gz | awk '{ print $1 }'` echo "HASH: $HASH" >> $ROOT/$DATE.log END_AT=`date +%s` echo "Done. $((END_AT-START_AT)) seconds elapsed." >> $ROOT/$DATE.log -
k9982874 revised this gist
May 15, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,7 @@ tar --exclude=/proc \ --exclude=/media \ --exclude=/var/log \ --exclude=/var/cache \ --exclude=lost+found \ --exclude=*.sock \ --one-file-system \ -P \ @@ -36,4 +36,4 @@ echo "HASH: $HASH" >> $ROOT/$DATE.log END_AT=`date +%s` echo "Done. $((END_AT-START_AT)) seconds elapsed." >> $ROOT/$DATE.log -
k9982874 revised this gist
May 15, 2019 . 1 changed file with 11 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,10 @@ #*mangle #:PREROUTING ACCEPT [0:0] #:INPUT ACCEPT [0:0] #:FORWARD ACCEPT [0:0] #:OUTPUT ACCEPT [0:0] #:POSTROUTING ACCEPT [0:0] #COMMIT *filter :INPUT ACCEPT [0:0] @@ -33,8 +33,8 @@ COMMIT -A FORWARD -o ppp0 -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu # Forward internal and external -A FORWARD -i ppp0 -o br0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A FORWARD -i br0 -o ppp0 -j ACCEPT # Forward for openvpn -A FORWARD -i ppp0 -o tun+ -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT @@ -75,4 +75,6 @@ COMMIT :OUTPUT ACCEPT [0:0] :POSTROUTING ACCEPT [0:0] -A POSTROUTING -o ppp0 -j MASQUERADE -A PREROUTING -p tcp -m set --match-set gfwlist dst -j REDIRECT --to-ports 10800 -A OUTPUT -p tcp -m set --match-set gfwlist dst -j REDIRECT --to-ports 10800 COMMIT -
k9982874 revised this gist
May 14, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,4 +36,4 @@ echo "HASH: $HASH" >> $ROOT/$DATE.log END_AT=`date +%s` echo "Done. $((END_AT-START_AT)) seconds elapsed." >> $ROOT/$DATE.log -
k9982874 revised this gist
May 14, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,12 +16,12 @@ START_AT=`date +%s` mysqldump --opt --complete-insert --add-drop-database -uroot -p111111 --databases nextcloud | \ openssl aes-256-cbc -pbkdf2 -out $ROOT/$DATE.sql -pass pass:$PASS tar --exclude=/lost+found -P --one-file-system --use-compress-program pigz -cvpf - /mnt/data/web 2> $ROOT/$DATE.log | \ openssl aes-256-cbc -pbkdf2 -out $ROOT/$DATE.tar.gz -pass pass:$PASS HASH=`md5sum $ROOT/$DATE.tar.gz | awk '{ print $1 }'` echo "HASH: $HASH" >> $ROOT/$DATE.log END_AT=`date +%s` echo "Done. $((END_AT-START_AT)) seconds elapsed." >> $ROOT/$DATE.log -
k9982874 revised this gist
May 14, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ if [ -z "$PASS" ]; then exit 0 fi ROOT=/mnt/data/backups/gitea find $ROOT/ -type f -name '*' -mtime +30 -exec rm {} \; @@ -16,7 +16,7 @@ START_AT=`date +%s` mysqldump --opt --complete-insert --add-drop-database -uroot -p111111 --databases gitea | \ openssl aes-256-cbc -pbkdf2 -out $ROOT/$DATE.sql -pass pass:$PASS tar --exclude=/lost+found --one-file-system -P --use-compress-program pigz -cvpf - /mnt/data/gitea 2> $ROOT/$DATE.log | \ openssl aes-256-cbc -pbkdf2 -out $ROOT/$DATE.tar.gz -pass pass:$PASS HASH=`md5sum $ROOT/$DATE.tar.gz | awk '{ print $1 }'` -
k9982874 renamed this gist
May 14, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
k9982874 revised this gist
May 14, 2019 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,8 +25,9 @@ tar --exclude=/proc \ --exclude=/lost+found \ --exclude=*.sock \ --one-file-system \ -P \ --use-compress-program pigz \ -cvpf - / \ 2> $ROOT/$DATE.log \ | openssl aes-256-cbc -pbkdf2 -out $ROOT/$DATE.tar.gz -pass pass:$PASS -
k9982874 revised this gist
May 14, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ START_AT=`date +%s` mysqldump --opt --complete-insert --add-drop-database -uroot -p111111 --databases nextcloud | \ openssl aes-256-cbc -pbkdf2 -out $ROOT/$DATE.sql -pass pass:$PASS tar --exclude=/lost+found -P --one-file-system --use-compress-program pigz -cvpf - /mnt/data/web/ 2> $ROOT/$DATE.log | \ openssl aes-256-cbc -pbkdf2 -out $ROOT/$DATE.tar.gz -pass pass:$PASS HASH=`md5sum $ROOT/$DATE.tar.gz | awk '{ print $1 }'` -
k9982874 revised this gist
May 14, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ START_AT=`date +%s` mysqldump --opt --complete-insert --add-drop-database -uroot -p111111 --databases gitea | \ openssl aes-256-cbc -pbkdf2 -out $ROOT/$DATE.sql -pass pass:$PASS tar --exclude=/lost+found --one-file-system -P --use-compress-program pigz -cvpf - /mnt/data/workspace/ 2> $ROOT/$DATE.log | \ openssl aes-256-cbc -pbkdf2 -out $ROOT/$DATE.tar.gz -pass pass:$PASS HASH=`md5sum $ROOT/$DATE.tar.gz | awk '{ print $1 }'` -
k9982874 revised this gist
May 14, 2019 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,9 @@ #!/bin/bash if [ -z "$PASS" ]; then echo "Please setup password for the archive" exit 0 fi ROOT=/mnt/data/backups/workspace -
k9982874 revised this gist
May 14, 2019 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,9 @@ #!/bin/bash if [ -z "$PASS" ]; then echo "Please setup password for the archive" exit 0 fi ROOT=/mnt/data/backups/web -
k9982874 revised this gist
May 14, 2019 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,9 @@ #!/bin/bash if [ -z "$PASS" ]; then echo "Please setup password for the archive" exit 0 fi ROOT=/mnt/data/backups/system -
k9982874 revised this gist
May 14, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ START_AT=`date +%s` mysqldump --opt --complete-insert --add-drop-database -uroot -p111111 --databases gitea | \ openssl aes-256-cbc -pbkdf2 -out $ROOT/$DATE.sql -pass pass:$PASS tar --exclude=/lost+found --one-file-system --use-compress-program pigz -cvp - /mnt/data/workspace/ 2> $ROOT/$DATE.log | \ openssl aes-256-cbc -pbkdf2 -out $ROOT/$DATE.tar.gz -pass pass:$PASS HASH=`md5sum $ROOT/$DATE.tar.gz | awk '{ print $1 }'` -
k9982874 revised this gist
May 14, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ START_AT=`date +%s` mysqldump --opt --complete-insert --add-drop-database -uroot -p111111 --databases nextcloud | \ openssl aes-256-cbc -pbkdf2 -out $ROOT/$DATE.sql -pass pass:$PASS tar --exclude=/lost+found --one-file-system --use-compress-program pigz -cvp - /mnt/data/web/ 2> $ROOT/$DATE.log | \ openssl aes-256-cbc -pbkdf2 -out $ROOT/$DATE.tar.gz -pass pass:$PASS HASH=`md5sum $ROOT/$DATE.tar.gz | awk '{ print $1 }'`
NewerOlder