aboutsummaryrefslogblamecommitdiffstats
path: root/backup-notes
blob: bd499ddd992979bbf0dc4b9cc1241b68ac404452 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                   








                                         
                                 

                                       
                                                                                                                                                
#!/usr/bin/env bash

# Source folder to be backed up
src_folder="/home/lemon/Documents/Notes/"

# Remote server details
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} -i ${ssh_key} -o \"StrictHostKeyChecking=no\"" ${src_folder} ${remote_user}@${remote_host}:${remote_folder}