diff options
| author | grothedev <grothedev@gmail.com> | 2022-06-16 10:36:32 -0400 |
|---|---|---|
| committer | grothedev <grothedev@gmail.com> | 2022-06-16 10:36:32 -0400 |
| commit | a0a8557dae52cde720cd8265c30b20035e1924fd (patch) | |
| tree | 49c9a9dd3b8d2141d5625225eba90d49e6727822 /backup_simple | |
| parent | 7cffee6a046410d57e3da145404219daa8f6dd71 (diff) | |
bug fixes and updated backed-up files
Diffstat (limited to 'backup_simple')
| -rwxr-xr-x | backup_simple | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/backup_simple b/backup_simple index 9bdcc88..72b2a3c 100755 --- a/backup_simple +++ b/backup_simple @@ -18,9 +18,9 @@ src_path="$1" #dest='hb:/var/stor/personal/backup/' dest_host="hb" if [[ $HB_BACKUP_DIR ]]; then - dest_path=$HB_BACKUP_DIR"/"${src_path} + dest_path=$HB_BACKUP_DIR"/" else - dest_path="~/"${src_path} + dest_path="~/" fi rsargs='' @@ -36,14 +36,14 @@ if [[ $3 ]]; then fi dest=$dest_host":"$dest_path -if [[ ${dest_path: -1} == "/" ]]; then - ssh hb mkdir -p ${dest_path} -else - dest_parent_dir=`echo $dest_path | rev | cut -d'/' -f2- | rev` - ssh hb mkdir -p ${dest_parent_dir} -fi +#if [[ ${dest_path: -1} == "/" ]]; then +# ssh hb mkdir -p ${dest_path} +#else +# dest_parent_dir=`echo $dest_path | rev | cut -d'/' -f2- | rev` +# ssh hb mkdir -p ${dest_parent_dir} +#fi echo "NEW BACKUP $d ${src_path} -> ${dest}" >> /var/log/datasync.log -rsync -arvzP --protect-args -e ssh --update ${src_path} ${dest} ${rsargs} >> /var/log/datasync.log +rsync -ahAvz --protect-args -e ssh --update ${src_path} ${dest} ${rsargs} >> /var/log/datasync.log echo "" >> /var/log/datasync.log |
