mirror of
https://github.com/eddyem/small_tel.git
synced 2026-03-21 09:10:58 +03:00
add some bash scripts
This commit is contained in:
18
Auxiliary_utils/bash_scripts/copy_and_xz.sh
Executable file
18
Auxiliary_utils/bash_scripts/copy_and_xz.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# $1 - directory to be copied
|
||||
#
|
||||
|
||||
RDIR="/home/obs/robotel1_2025"
|
||||
|
||||
# copy non-FITS files
|
||||
tar c --exclude='*.fit' --exclude='*shit*' $1 | ssh obs@roboserv "tar x -C $RDIR"
|
||||
#tar c --exclude='*.fit' --exclude='*shit*' $1 | ssh obs@roboserv "tar x -C /home/obs/robotel1_2023"
|
||||
|
||||
# copy FITS files and XZ-ing it on remote server
|
||||
CMD='sh -c "xz -6e -T0 - > $TAR_FILENAME.xz"'
|
||||
tar c $1/*.fit | ssh obs@roboserv "cd $RDIR; tar x --to-command='$CMD'"
|
||||
#tar c $1/*.fit | ssh obs@roboserv "cd /home/obs/robotel1_2023; tar x --to-command='$CMD'"
|
||||
|
||||
ssh obs@roboserv "cd $RDIR; tar c $1 | ssh data@robostorage 'tar x -C /mnt/ARCHIVE/ROBOTEL1/'"
|
||||
Reference in New Issue
Block a user