Commit 4467668b authored by Nono's avatar Nono

Update backup_borg.sh

s/syno/remote + edit comments
parent 7072e0e4
#!/bin/bash
# Mount parameters
# General parameters
mount="/mnt/path/to/be/mounted"
#Borg parameters
......@@ -8,11 +8,12 @@ repo="/mnt/path/to/be/mounted/depotname"
pass="passwordhere"
backup_dir="/etc /root /usr/local/bin /home"
#Synology parameters
syno_user="backupuser"
syno_ip=`cat /home/ip_syn`
syno_port="22"
syno_dir="/remote/backup/path/"
# remote server parameters
remote_user="backupuser"
#remote_ip=`cat /home/ip_remote_server`
remote_ip="1.1.1.1"
remote_port="22"
remote_dir="/remote/backup/path/"
# Setting this, so the repo does not need to be given on the commandline:
export BORG_REPO=${repo}
......@@ -30,8 +31,8 @@ if mount | grep ${mount} > /dev/null;
then
info "${mount} already mounted";
else
info "Mount: sshfs ${syno_user}@${syno_ip}:${syno_dir} ${mount} -p ${syno_port}"
sshfs ${syno_user}@${syno_ip}:${syno_dir} ${mount} -p ${syno_port}
info "Mount: sshfs ${remote_user}@${remote_ip}:${remote_dir} ${mount} -p ${remote_port}"
sshfs ${remote_user}@${remote_ip}:${remote_dir} ${mount} -p ${remote_port}
retour1=$?
if [ $retour1 -eq 0 ];
then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment