backupNctypo1ToLocal.sh 1.01 KB
#!/bin/bash
#
#	@package export_import
#	@since 20131205	@author frederick@netz.coop
#
#	stoesst export skripte auf dem Server an, kopiert zu lokal und installiert hier
#
. basepath.inc.sh
. "$__PATH_to_mcBash/include.inc.sh"

execute=1
#logfile="$__PATH_to_Log/ncExportMysql.log"
DATETIME=$(date +"%Y%m%d_%H%M%S")
#dir_backupServer="/home/backupServer/nctypo1_$DATETIME"
dir_backupServer="/home/backupServer/nctypo1"

#mc_bashsu "scp sn@144.76.125.173:/home/sn/temp  $dir_backupServer " $execute $logfile
mc_bashsu "cd $dir_backupServer" $execute $logfile
mc_bashsu "$(for i in $(find *.tar.gz -type f); do tar -xzf  $i; done)" $execute $logfile
mc_bashsu "$__PATH_to_mcBash/bin/ncImportMysql.sh"  $execute $logfile

mc_bashsu "cd $__THIS_DIR" $execute $logfile


mc_bashsu "ln -s /home/backupServer/nctypo1/var/www/ /var/www/nctypo1" $execute $logfile

mkdir /var/www/nctypo1/netz-bb.netz.coop/tpyo3temp
chown -R  www-data:www-data /var/www/nctypo1/git_checkout_TYPO_6-1/
chown -R  www-data:www-data /var/www/nctypo1/netz-bb.netz.coop/