diff options
author | Matthew Lemon <y@yulqen.org> | 2023-03-29 13:18:11 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2023-03-29 13:18:11 +0100 |
commit | 496025799267b35d29b4d7a473f9920079bb1eae (patch) | |
tree | 526cbe4052fa5277eae41fb613f66f2fc35fb01f | |
parent | 66f1d9a8099ba9c961d724e752e848a2d2c2bcb5 (diff) |
updated script to point to ssh key
-rwxr-xr-x | backup-notes | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/backup-notes b/backup-notes index 4cc56e4..6136d1a 100755 --- a/backup-notes +++ b/backup-notes @@ -1,4 +1,4 @@ -#!/bin/env bash +#!/usr/bin/env bash # Source folder to be backed up src_folder="/home/lemon/Documents/Notes/" @@ -8,6 +8,7 @@ remote_user="lemon" remote_host="16693433.xyz" remote_port="2222" remote_folder="/home/lemon/Backups/Notes" +ssh_key="/home/lemon/.ssh/id_rsa" # Run rsync command to sync the folders -rsync -avz -e "ssh -p ${remote_port}" ${src_folder} ${remote_user}@${remote_host}:${remote_folder} +rsync -avz -e "ssh -p ${remote_port} -i ${ssh_key}" ${src_folder} ${remote_user}@${remote_host}:${remote_folder} |