aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlookshe <github@lookshe.org>2023-06-12 21:15:41 +0200
committerlookshe <github@lookshe.org>2023-06-12 21:15:41 +0200
commit9c9ab49442830d1d38debf6947bf00d71db3d6df (patch)
treec6268be109c3d681f2a424c3cde6b35c3bf9d6f1
parent7c2d0642c43b75d1e17d88ecd4d3e895aaaf2032 (diff)
remove remote path for borgborgbackup
-rwxr-xr-xbackup.sh8
-rwxr-xr-xbackup_db.sh6
-rw-r--r--main.cfg1
3 files changed, 7 insertions, 8 deletions
diff --git a/backup.sh b/backup.sh
index 567d15e..3e06c00 100755
--- a/backup.sh
+++ b/backup.sh
@@ -72,11 +72,11 @@ function check_borg_repo {
repo_path="$userserver:$backupdir/$serverdir/$repo"
fi
#check if repo exists
- $nice $borg_local_path list --remote-path "$borg_remote_path" "$repo_path" > /dev/null 2>&1
+ $nice $borg_local_path list "$repo_path" > /dev/null 2>&1
if [ $? -ne 0 ]
then
# create repo if not exists
- $nice $borg_local_path init --remote-path "$borg_remote_path" --encryption "$borg_encryption" "$repo_path"
+ $nice $borg_local_path init --encryption "$borg_encryption" "$repo_path"
if [ $? -ne 0 ]
then
$echo "problem in borg init $repo"
@@ -108,10 +108,10 @@ function backup_dir {
ret=0
if [ -f "backup.ignore" ]
then
- $nice $borg_local_path create --remote-path "$borg_remote_path" --one-file-system --exclude-from "backup.ignore" --compression "$borg_compression" "$repo_path" .
+ $nice $borg_local_path create --one-file-system --exclude-from "backup.ignore" --compression "$borg_compression" "$repo_path" .
ret=$?
else
- $nice $borg_local_path create --remote-path "$borg_remote_path" --one-file-system --compression "$borg_compression" "$repo_path" .
+ $nice $borg_local_path create --one-file-system --compression "$borg_compression" "$repo_path" .
ret=$?
fi
popd > /dev/null
diff --git a/backup_db.sh b/backup_db.sh
index d35f921..e99243d 100755
--- a/backup_db.sh
+++ b/backup_db.sh
@@ -75,11 +75,11 @@ function check_borg_repo {
repo_path="$userserver:$backupdir/$serverdir/$repo"
fi
#check if repo exists
- $nice $borg_local_path list --remote-path "$borg_remote_path" "$repo_path" > /dev/null 2>&1
+ $nice $borg_local_path list "$repo_path" > /dev/null 2>&1
if [ $? -ne 0 ]
then
# create repo if not exists
- $nice $borg_local_path init --remote-path "$borg_remote_path" --encryption "$borg_encryption" "$repo_path"
+ $nice $borg_local_path init --encryption "$borg_encryption" "$repo_path"
if [ $? -ne 0 ]
then
$echo "problem in borg init $repo"
@@ -107,7 +107,7 @@ function backup_db {
repo_path="$userserver:$backupdir/$serverdir/$repo::{now:$default_timestamp}"
fi
ret=0
- $nice $borg_local_path create --remote-path "$borg_remote_path" --one-file-system --compression "$borg_compression" "$repo_path" .
+ $nice $borg_local_path create --one-file-system --compression "$borg_compression" "$repo_path" .
ret=$?
if [ $ret -ne 0 ]
then
diff --git a/main.cfg b/main.cfg
index 1d2de91..8c196cd 100644
--- a/main.cfg
+++ b/main.cfg
@@ -7,7 +7,6 @@ logfile=$confdir/logfile.log
keyfile=/PATH/TO/KEYFILE/id_rsa
userserver="backupuser@backup.server"
borg_local_path=/usr/local/sbin/borg
-borg_remote_path=/usr/local/sbin/borg
# for borg specific settings take a look at its documentation https://borgbackup.readthedocs.io/
borg_compression=zlib,9
borg_encryption=none