]> git.parisson.com Git - crem-scripts.git/commitdiff
init crem admin scripts
authorGuillaume Pellerin <yomguy@parisson.com>
Sun, 24 Nov 2013 23:21:29 +0000 (00:21 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Sun, 24 Nov 2013 23:21:29 +0000 (00:21 +0100)
crem_import_final_new.sh [new file with mode: 0755]
crem_import_final_old.sh [new file with mode: 0755]
crem_import_sandbox_new.sh [new file with mode: 0755]
crem_import_sandbox_old.sh [new file with mode: 0755]
irsync_telemeta_crem.sh [new file with mode: 0755]
rso_db_parisson [new file with mode: 0755]
rso_logs [new file with mode: 0755]

diff --git a/crem_import_final_new.sh b/crem_import_final_new.sh
new file mode 100755 (executable)
index 0000000..4dced0f
--- /dev/null
@@ -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 (executable)
index 0000000..e09c9c5
--- /dev/null
@@ -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 (executable)
index 0000000..150a454
--- /dev/null
@@ -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 (executable)
index 0000000..5a39442
--- /dev/null
@@ -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 (executable)
index 0000000..472fc44
--- /dev/null
@@ -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 (executable)
index 0000000..c6d4d10
--- /dev/null
@@ -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 (executable)
index 0000000..06be6d8
--- /dev/null
+++ b/rso_logs
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+rsync -a /home/parisson/logs/ momo@parisson.com:crem/logs/