Skip to content

Instantly share code, notes, and snippets.

@amityweb
Last active April 16, 2024 00:52
Show Gist options
  • Select an option

  • Save amityweb/da8c5d7da9d043901ad10f69d7bed73e to your computer and use it in GitHub Desktop.

Select an option

Save amityweb/da8c5d7da9d043901ad10f69d7bed73e to your computer and use it in GitHub Desktop.

Revisions

  1. amityweb revised this gist Apr 16, 2024. 1 changed file with 4 additions and 11 deletions.
    15 changes: 4 additions & 11 deletions rclone-backups
    Original file line number Diff line number Diff line change
    @@ -1,31 +1,24 @@
    #!/bin/bash

    # Only run if rclone sync is not already running from previous
    ps_out=`ps -ef | grep "rclone sync\|bash rclone" | grep -v 'grep'`
    result=$(echo $ps_out | grep "$1")
    if [[ "$result" = "" ]];then
    if [ "$result" = "" ];then

    # DB Dumps First
    #for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done

    # Home Folder Dump
    #DATE=$(date +%Y-%m-%d.%H-%M-%S)
    DATE=$(date +%Y-%m-%d.%H:00)
    SOURCE="/home/"
    #TARGET="WasabiTest:rclone-testing/$1"
    #TARGET="OneDrive:Backups/$1"
    #TARGET="AmityGoogleDrive:Amity/Backups/$1"
    #TARGET="AmazonS3:amity-server-backups/$1"
    TARGET="Mega:Backups/$1"
    LATESTFOLDER="$TARGET/latest"
    INCFOLDER="$TARGET/inc/$DATE"

    /usr/bin/rclone sync --verbose --skip-links --no-update-modtime --transfers=5 --checkers=4 --tpslimit=5 --tpslimit-burst 5 --max-backlog 200000 --exclude "_tbd/**" --exclude "_bkp/**" --exclude=".DS_Store" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER

    else
    else
    echo "Rclone is already Running."
    fi
    exit
    fi




  2. amityweb revised this gist Apr 16, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    # Only run if rclone sync is not already running from previous
    ps_out=`ps -ef | grep "rclone sync\|bash rclone" | grep -v 'grep'`
    result=$(echo $ps_out | grep "$1")
    if [[ "$result" == "" ]];then
    if [[ "$result" = "" ]];then

    # DB Dumps First
    #for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done
  3. amityweb revised this gist Apr 16, 2024. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions rclone-backups
    Original file line number Diff line number Diff line change
    @@ -3,8 +3,7 @@
    # Only run if rclone sync is not already running from previous
    ps_out=`ps -ef | grep "rclone sync\|bash rclone" | grep -v 'grep'`
    result=$(echo $ps_out | grep "$1")
    if [ "$result" = "" ]
    then
    if [[ "$result" == "" ]];then

    # DB Dumps First
    #for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done
  4. amityweb revised this gist Apr 16, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    # Only run if rclone sync is not already running from previous
    ps_out=`ps -ef | grep "rclone sync\|bash rclone" | grep -v 'grep'`
    result=$(echo $ps_out | grep "$1")
    if[ "$result" = "" ]
    if [ "$result" = "" ]
    then

    # DB Dumps First
  5. amityweb revised this gist Apr 16, 2024. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,8 @@
    # Only run if rclone sync is not already running from previous
    ps_out=`ps -ef | grep "rclone sync\|bash rclone" | grep -v 'grep'`
    result=$(echo $ps_out | grep "$1")
    if[ $result -eq "" ]; then
    if[ "$result" = "" ]
    then

    # DB Dumps First
    #for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done
  6. amityweb revised this gist Apr 16, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    # Only run if rclone sync is not already running from previous
    ps_out=`ps -ef | grep "rclone sync\|bash rclone" | grep -v 'grep'`
    result=$(echo $ps_out | grep "$1")
    if[[ $result -eq "" ]]; then
    if[ $result -eq "" ]; then

    # DB Dumps First
    #for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done
  7. amityweb revised this gist Apr 16, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    # Only run if rclone sync is not already running from previous
    ps_out=`ps -ef | grep "rclone sync\|bash rclone" | grep -v 'grep'`
    result=$(echo $ps_out | grep "$1")
    if [ $result -eq "" ]; then
    if[[ $result -eq "" ]]; then

    # DB Dumps First
    #for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done
  8. amityweb revised this gist Apr 16, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    # Only run if rclone sync is not already running from previous
    ps_out=`ps -ef | grep "rclone sync\|bash rclone" | grep -v 'grep'`
    result=$(echo $ps_out | grep "$1")
    if [ $result = "" ]; then
    if [ $result -eq "" ]; then

    # DB Dumps First
    #for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done
  9. amityweb revised this gist Apr 16, 2024. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions rclone-backups
    Original file line number Diff line number Diff line change
    @@ -3,10 +3,8 @@
    # Only run if rclone sync is not already running from previous
    ps_out=`ps -ef | grep "rclone sync\|bash rclone" | grep -v 'grep'`
    result=$(echo $ps_out | grep "$1")
    if [ $result != "" ]; then
    echo "Rclone is already Running."
    else

    if [ $result = "" ]; then

    # DB Dumps First
    #for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done

    @@ -24,6 +22,8 @@ if [ $result != "" ]; then

    /usr/bin/rclone sync --verbose --skip-links --no-update-modtime --transfers=5 --checkers=4 --tpslimit=5 --tpslimit-burst 5 --max-backlog 200000 --exclude "_tbd/**" --exclude "_bkp/**" --exclude=".DS_Store" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER

    else
    echo "Rclone is already Running."
    fi
    exit

  10. amityweb revised this gist Apr 16, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    # Only run if rclone sync is not already running from previous
    ps_out=`ps -ef | grep "rclone sync\|bash rclone" | grep -v 'grep'`
    result=$(echo $ps_out | grep "$1")
    if [[ "$result" != "" ]];then
    if [ $result != "" ]; then
    echo "Rclone is already Running."
    else

  11. amityweb revised this gist Apr 16, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@ if [[ "$result" != "" ]];then
    #TARGET="OneDrive:Backups/$1"
    #TARGET="AmityGoogleDrive:Amity/Backups/$1"
    #TARGET="AmazonS3:amity-server-backups/$1"
    TARGET="Dropbox:Backups/$1"
    TARGET="Mega:Backups/$1"
    LATESTFOLDER="$TARGET/latest"
    INCFOLDER="$TARGET/inc/$DATE"

  12. amityweb revised this gist Feb 24, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ if [[ "$result" != "" ]];then
    LATESTFOLDER="$TARGET/latest"
    INCFOLDER="$TARGET/inc/$DATE"

    /usr/bin/rclone sync --verbose --skip-links --no-update-modtime --transfers=5 --checkers=4 --tpslimit=5 --tpslimit-burst 5 --max-backlog 200000 --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER
    /usr/bin/rclone sync --verbose --skip-links --no-update-modtime --transfers=5 --checkers=4 --tpslimit=5 --tpslimit-burst 5 --max-backlog 200000 --exclude "_tbd/**" --exclude "_bkp/**" --exclude=".DS_Store" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER

    fi
    exit
  13. amityweb revised this gist Feb 24, 2024. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions rclone-backups
    Original file line number Diff line number Diff line change
    @@ -11,8 +11,8 @@ if [[ "$result" != "" ]];then
    #for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done

    # Home Folder Dump
    #DATE=$(date +%Y-%m-%d.%I-%M-%S)
    DATE=$(date +%Y-%m-%d.%I)
    #DATE=$(date +%Y-%m-%d.%H-%M-%S)
    DATE=$(date +%Y-%m-%d.%H:00)
    SOURCE="/home/"
    #TARGET="WasabiTest:rclone-testing/$1"
    #TARGET="OneDrive:Backups/$1"
    @@ -22,7 +22,7 @@ if [[ "$result" != "" ]];then
    LATESTFOLDER="$TARGET/latest"
    INCFOLDER="$TARGET/inc/$DATE"

    /usr/bin/rclone sync --verbose --skip-links --no-update-modtime --transfers=10 --checkers=4 --tpslimit=10 --max-backlog 200000 --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER
    /usr/bin/rclone sync --verbose --skip-links --no-update-modtime --transfers=5 --checkers=4 --tpslimit=5 --tpslimit-burst 5 --max-backlog 200000 --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER

    fi
    exit
  14. amityweb revised this gist Feb 24, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ if [[ "$result" != "" ]];then
    LATESTFOLDER="$TARGET/latest"
    INCFOLDER="$TARGET/inc/$DATE"

    /usr/bin/rclone sync --verbose --skip-links --transfers=10 --checkers=4 --tpslimit=10 --max-backlog 200000 --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER
    /usr/bin/rclone sync --verbose --skip-links --no-update-modtime --transfers=10 --checkers=4 --tpslimit=10 --max-backlog 200000 --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER

    fi
    exit
  15. amityweb revised this gist Feb 24, 2024. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,8 @@ if [[ "$result" != "" ]];then
    #for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done

    # Home Folder Dump
    DATE=$(date +%Y-%m-%d.%I-%M-%S)
    #DATE=$(date +%Y-%m-%d.%I-%M-%S)
    DATE=$(date +%Y-%m-%d.%I)
    SOURCE="/home/"
    #TARGET="WasabiTest:rclone-testing/$1"
    #TARGET="OneDrive:Backups/$1"
  16. amityweb revised this gist Feb 21, 2024. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,8 @@ if [[ "$result" != "" ]];then
    #TARGET="WasabiTest:rclone-testing/$1"
    #TARGET="OneDrive:Backups/$1"
    #TARGET="AmityGoogleDrive:Amity/Backups/$1"
    TARGET="AmazonS3:amity-server-backups/$1"
    #TARGET="AmazonS3:amity-server-backups/$1"
    TARGET="Dropbox:Backups/$1"
    LATESTFOLDER="$TARGET/latest"
    INCFOLDER="$TARGET/inc/$DATE"

  17. amityweb revised this gist Feb 20, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@ if [[ "$result" != "" ]];then
    LATESTFOLDER="$TARGET/latest"
    INCFOLDER="$TARGET/inc/$DATE"

    /usr/bin/rclone sync --skip-links --transfers=10 --checkers=4 --tpslimit=10 --max-backlog 200000 --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER
    /usr/bin/rclone sync --verbose --skip-links --transfers=10 --checkers=4 --tpslimit=10 --max-backlog 200000 --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER

    fi
    exit
  18. amityweb revised this gist Feb 20, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ if [[ "$result" != "" ]];then
    #TARGET="WasabiTest:rclone-testing/$1"
    #TARGET="OneDrive:Backups/$1"
    #TARGET="AmityGoogleDrive:Amity/Backups/$1"
    TARGET="AmazonS3:amity-backups/$1"
    TARGET="AmazonS3:amity-server-backups/$1"
    LATESTFOLDER="$TARGET/latest"
    INCFOLDER="$TARGET/inc/$DATE"

  19. amityweb revised this gist Feb 20, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ if [[ "$result" != "" ]];then
    else

    # DB Dumps First
    for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done
    #for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done

    # Home Folder Dump
    DATE=$(date +%Y-%m-%d.%I-%M-%S)
  20. amityweb revised this gist Feb 20, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/bash

    # Only run if rclone sync is not already running from previous
    ps_out=`ps -ef | grep "rclone sync" | grep -v 'grep'`
    ps_out=`ps -ef | grep "rclone sync\|bash rclone" | grep -v 'grep'`
    result=$(echo $ps_out | grep "$1")
    if [[ "$result" != "" ]];then
    echo "Rclone is already Running."
  21. amityweb revised this gist Feb 20, 2024. 1 changed file with 25 additions and 12 deletions.
    37 changes: 25 additions & 12 deletions rclone-backups
    Original file line number Diff line number Diff line change
    @@ -1,16 +1,29 @@
    #!/bin/bash

    # DB Dumps First
    for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done
    # Only run if rclone sync is not already running from previous
    ps_out=`ps -ef | grep "rclone sync" | grep -v 'grep'`
    result=$(echo $ps_out | grep "$1")
    if [[ "$result" != "" ]];then
    echo "Rclone is already Running."
    else

    # DB Dumps First
    for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done

    # Home Folder Dump
    DATE=$(date +%Y-%m-%d.%I-%M-%S)
    SOURCE="/home/"
    #TARGET="WasabiTest:rclone-testing/$1"
    #TARGET="OneDrive:Backups/$1"
    #TARGET="AmityGoogleDrive:Amity/Backups/$1"
    TARGET="AmazonS3:amity-backups/$1"
    LATESTFOLDER="$TARGET/latest"
    INCFOLDER="$TARGET/inc/$DATE"

    /usr/bin/rclone sync --skip-links --transfers=10 --checkers=4 --tpslimit=10 --max-backlog 200000 --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER

    fi
    exit


    # Home Folder Dump
    DATE=$(date +%Y-%m-%d.%I-%M-%S)
    SOURCE="/home/"
    #TARGET="WasabiTest:rclone-testing/$1"
    #TARGET="OneDrive:Backups/$1"
    #TARGET="AmityGoogleDrive:Amity/Backups/$1"
    TARGET="AmazonS3:amity-backups/$1"
    LATESTFOLDER="$TARGET/latest"
    INCFOLDER="$TARGET/inc/$DATE"

    /usr/bin/rclone sync --skip-links --transfers=10 --checkers=4 --tpslimit=10 --max-backlog 200000 --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER
  22. amityweb revised this gist Feb 20, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -13,4 +13,4 @@ TARGET="AmazonS3:amity-backups/$1"
    LATESTFOLDER="$TARGET/latest"
    INCFOLDER="$TARGET/inc/$DATE"

    /usr/bin/rclone sync --skip-links --transfers=20 --checkers=20 --tpslimit=10 --max-backlog 200000 --verbose --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER
    /usr/bin/rclone sync --skip-links --transfers=10 --checkers=4 --tpslimit=10 --max-backlog 200000 --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER
  23. amityweb revised this gist Jan 31, 2024. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions rclone-backups
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,15 @@
    #!/bin/bash

    # DB Dumps First
    #for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done
    for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done

    # Home Folder Dump
    DATE=$(date +%Y-%m-%d.%I-%M-%S)
    SOURCE="/home/"
    #TARGET="WasabiTest:rclone-testing/$1"
    TARGET="OneDrive:Backups/$1"
    #TARGET="OneDrive:Backups/$1"
    #TARGET="AmityGoogleDrive:Amity/Backups/$1"
    #TARGET="AmazonS3:amity-server-backups/$1"
    TARGET="AmazonS3:amity-backups/$1"
    LATESTFOLDER="$TARGET/latest"
    INCFOLDER="$TARGET/inc/$DATE"

  24. amityweb revised this gist Dec 24, 2023. 1 changed file with 1 addition and 4 deletions.
    5 changes: 1 addition & 4 deletions rclone-backups
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,4 @@ TARGET="OneDrive:Backups/$1"
    LATESTFOLDER="$TARGET/latest"
    INCFOLDER="$TARGET/inc/$DATE"




    /usr/bin/rclone sync --skip-links --transfers=10 --checkers=10 --tpslimit=10 --max-backlog 200000 --verbose --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER
    /usr/bin/rclone sync --skip-links --transfers=20 --checkers=20 --tpslimit=10 --max-backlog 200000 --verbose --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER
  25. amityweb revised this gist Dec 21, 2023. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,10 @@
    # Home Folder Dump
    DATE=$(date +%Y-%m-%d.%I-%M-%S)
    SOURCE="/home/"
    TARGET="WasabiTest:rclone-testing/$1"
    #TARGET="WasabiTest:rclone-testing/$1"
    TARGET="OneDrive:Backups/$1"
    #TARGET="AmityGoogleDrive:Amity/Backups/$1"
    #TARGET="AmazonS3:amity-server-backups/$1"
    LATESTFOLDER="$TARGET/latest"
    INCFOLDER="$TARGET/inc/$DATE"

  26. amityweb revised this gist Nov 12, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -13,4 +13,4 @@ INCFOLDER="$TARGET/inc/$DATE"



    /usr/bin/rclone sync --skip-links --transfers=5 --checkers=5 --tpslimit=5 --max-backlog 200000 --verbose --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER
    /usr/bin/rclone sync --skip-links --transfers=10 --checkers=10 --tpslimit=10 --max-backlog 200000 --verbose --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER
  27. amityweb revised this gist Nov 12, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -13,4 +13,4 @@ INCFOLDER="$TARGET/inc/$DATE"



    /usr/bin/rclone sync --skip-links --fast-list --transfers=40 --checkers=40 --tpslimit=10 --max-backlog 200000 --verbose --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER
    /usr/bin/rclone sync --skip-links --transfers=5 --checkers=5 --tpslimit=5 --max-backlog 200000 --verbose --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER
  28. amityweb revised this gist Nov 11, 2023. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions rclone-backups
    Original file line number Diff line number Diff line change
    @@ -4,13 +4,13 @@
    #for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done

    # Home Folder Dump
    #DATE=$(date +%Y-%m-%d.%I-%M-%S)
    #SOURCE="/home/"
    #TARGET="Wasabi:amity-backups/$1"
    #LATESTFOLDER="$TARGET/latest"
    #INCFOLDER="$TARGET/inc/$DATE"
    DATE=$(date +%Y-%m-%d.%I-%M-%S)
    SOURCE="/home/"
    TARGET="WasabiTest:rclone-testing/$1"
    LATESTFOLDER="$TARGET/latest"
    INCFOLDER="$TARGET/inc/$DATE"




    #/usr/bin/rclone sync --skip-links --fast-list --transfers=40 --checkers=40 --tpslimit=10 --max-backlog 200000 --verbose --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" --delete-during $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER
    /usr/bin/rclone sync --skip-links --fast-list --transfers=40 --checkers=40 --tpslimit=10 --max-backlog 200000 --verbose --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER
  29. amityweb revised this gist Oct 10, 2023. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions rclone-backups
    Original file line number Diff line number Diff line change
    @@ -1,16 +1,16 @@
    #!/bin/bash

    # DB Dumps First
    for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done
    #for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done

    # Home Folder Dump
    DATE=$(date +%Y-%m-%d.%I-%M-%S)
    SOURCE="/home/"
    TARGET="Wasabi:amity-backups/$1"
    LATESTFOLDER="$TARGET/latest"
    INCFOLDER="$TARGET/inc/$DATE"
    #DATE=$(date +%Y-%m-%d.%I-%M-%S)
    #SOURCE="/home/"
    #TARGET="Wasabi:amity-backups/$1"
    #LATESTFOLDER="$TARGET/latest"
    #INCFOLDER="$TARGET/inc/$DATE"




    /usr/bin/rclone sync --skip-links --fast-list --transfers=40 --checkers=40 --tpslimit=10 --max-backlog 200000 --verbose --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" --delete-during $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER
    #/usr/bin/rclone sync --skip-links --fast-list --transfers=40 --checkers=40 --tpslimit=10 --max-backlog 200000 --verbose --exclude "_tbd/**" --exclude "_bkp/**" --exclude "ssl.*" --exclude "etc/**" --exclude "fcgi-bin/**" --exclude "cgi-bin/**" --exclude "logs/**" --exclude "tmp/**" --exclude "Maildir/**" --exclude "cache/**" --delete-during $SOURCE $LATESTFOLDER --backup-dir=$INCFOLDER
  30. amityweb revised this gist Mar 14, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rclone-backups
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'per
    # Home Folder Dump
    DATE=$(date +%Y-%m-%d.%I-%M-%S)
    SOURCE="/home/"
    TARGET="OneDrive:Backups/$1"
    TARGET="Wasabi:amity-backups/$1"
    LATESTFOLDER="$TARGET/latest"
    INCFOLDER="$TARGET/inc/$DATE"