From: Guillaume Pellerin Date: Sun, 24 Nov 2013 23:21:29 +0000 (+0100) Subject: init crem admin scripts X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=3152e5cbec1f61cd6ffa729cfc3e82471317a3cf;p=crem-scripts.git init crem admin scripts --- 3152e5cbec1f61cd6ffa729cfc3e82471317a3cf diff --git a/crem_import_final_new.sh b/crem_import_final_new.sh new file mode 100755 index 0000000..4dced0f --- /dev/null +++ b/crem_import_final_new.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +date=`date '+%y-%m-%d_%H-%M-%S'` +script="/home/parisson/apps/telemeta/tools/scripts/telemeta-crem-import.py" +project="/home/parisson/crem_final" +sources="/data/telemeta/import/tmp_new/" +pattern="CNRSMH" +log="/data/telemeta/logs/import/import_new_$date.log" +domain="archives.crem-cnrs.fr" + +$script $project $sources $pattern $log $domain + diff --git a/crem_import_final_old.sh b/crem_import_final_old.sh new file mode 100755 index 0000000..e09c9c5 --- /dev/null +++ b/crem_import_final_old.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +date=`date '+%y-%m-%d_%H-%M-%S'` +script="/home/parisson/apps/telemeta/tools/scripts/telemeta-crem-import.py" +project="/home/parisson/crem_final" +sources="/data/telemeta/import/tmp_old/" +pattern="CNRSMH" +log="/data/telemeta/logs/import/import_old_$date.log" +domain="archives.crem-cnrs.fr" + +$script $project $sources $pattern $log $domain + diff --git a/crem_import_sandbox_new.sh b/crem_import_sandbox_new.sh new file mode 100755 index 0000000..150a454 --- /dev/null +++ b/crem_import_sandbox_new.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +date=`date '+%y-%m-%d_%H-%M-%S'` +script="/home/parisson/apps/telemeta/tools/scripts/telemeta-crem-import-test.py " +project="/home/parisson/crem_sandbox" +sources="/data/telemeta/import/tmp_new/" +pattern="CNRSMH" +log="/home/parisson/logs/audio/import_new_test_$date.log" +domain="crem.test.telemeta.org" + +$script $project $sources $pattern $log $domain + diff --git a/crem_import_sandbox_old.sh b/crem_import_sandbox_old.sh new file mode 100755 index 0000000..5a39442 --- /dev/null +++ b/crem_import_sandbox_old.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +date=`date '+%y-%m-%d_%H-%M-%S'` +script="/home/parisson/apps/telemeta/tools/scripts/telemeta-crem-import-test.py " +project="/home/parisson/crem_sandbox" +sources="/data/telemeta/import/tmp_old/" +pattern="CNRSMH" +log="/home/parisson/logs/audio/import_old_test_$date.log" +domain="crem.test.telemeta.org" + +$script $project $sources $pattern $log $domain + diff --git a/irsync_telemeta_crem.sh b/irsync_telemeta_crem.sh new file mode 100755 index 0000000..472fc44 --- /dev/null +++ b/irsync_telemeta_crem.sh @@ -0,0 +1,19 @@ +#!/usr/bin/python + +import os, sys + +paths = [ '/home/parisson/conf/archives','/home/parisson/crem_final','/home/parisson/apps/telemeta', + '/home/parisson/apps/timeside','/data/telemeta/backup/db','/data/telemeta/static','/data/telemeta/media'] + +if len(sys.argv) >= 1: + if sys.argv[-1] == '-l': + options = '-l' + else: + options = '' + +for path in paths: + collection = path.split('/')[-1] + command = ' '.join(['/usr/local/share/icommands/bin/irsync -r', options, path, 'i:/tge-adonis/crem/'+collection]) +# print command + os.system(command) + diff --git a/rso_db_parisson b/rso_db_parisson new file mode 100755 index 0000000..c6d4d10 --- /dev/null +++ b/rso_db_parisson @@ -0,0 +1,3 @@ +#!/bin/sh + +sudo rsync -a /var/backup-db/ crem@parisson.com: diff --git a/rso_logs b/rso_logs new file mode 100755 index 0000000..06be6d8 --- /dev/null +++ b/rso_logs @@ -0,0 +1,3 @@ +#!/bin/sh + +rsync -a /home/parisson/logs/ momo@parisson.com:crem/logs/