FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PDN Canto Config
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
James Nairn
PDN Canto Config
Commits
ddc87ef8
Commit
ddc87ef8
authored
3 years ago
by
Vitor Trovisco
Browse files
Options
Downloads
Patches
Plain Diff
weekly_export.sh - testing parallel copying the export json file to a couple of different folders
parent
d89e2500
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
weekly_export.sh
+13
-10
13 additions, 10 deletions
weekly_export.sh
with
13 additions
and
10 deletions
weekly_export.sh
+
13
−
10
View file @
ddc87ef8
...
...
@@ -2,7 +2,7 @@
# This script exports data from canto - to be set to run automatically on Wednesdays noon.
# Define canto-space root
# Define canto-space root
in flybase-vm
CANTOSPACE
=
"/data/export/canto-space"
# Define logs folder inside canto-space
...
...
@@ -11,14 +11,12 @@ LOGS="logs"
# Define log file
LOGFILE
=
"
${
CANTOSPACE
}
/
${
LOGS
}
/canto_weekly_export.log"
# Define path to staging folder in flybase-vm
STAGING_CANTOEXPORT
=
"/data/export/staging/canto_export_json"
# Redirect all output to logfile
exec
&>>
"
${
LOGFILE
}
"
# Create archive directory if required
EXPORT_DIR
=
"
${
CANTOSPACE
}
/import_export"
EXPORT_FILENAME
=
canto_server_export_latest.json
# Function to log messages with date stamp
# e.g. log "Canto script completed successfully" generates something like 2020-05-20 10:24:37: Canto script completed successfully
...
...
@@ -27,7 +25,7 @@ function log () {
/bin/echo
"
${
DATESTAMP
}
:
${
1
}
"
}
#
Create archive directory if required
#
Define export directory filepath
EXPORT_DIR
=
"
${
CANTOSPACE
}
/import_export"
EXPORT_FILENAME
=
canto_server_export_latest.json
...
...
@@ -50,10 +48,15 @@ if ./canto/script/canto_docker --non-interactive ./script/canto_export.pl canto
EXPORT_FILENAME_ARCHIVE
=
"canto_server_export_
$(
date
+
"%Y-%m-%d-%T"
)
.json"
# Copying canto_server_export_latest.json to archive
log
"Copying
${
EXPORT_FILENAME
}
to
${
ARCHIVE
}
/
${
EXPORT_FILENAME_ARCHIVE
}
"
## Copying canto_server_export_latest.json to local canto-space archive and flybase-vm staging folder
#log "Archiving ${EXPORT_FILENAME} to ${ARCHIVE}/${EXPORT_FILENAME_ARCHIVE} and ${STAGING_CANTOEXPORT}/${EXPORT_FILENAME_ARCHIVE}"
#parallel cp -v "${EXPORT_DIR}/${EXPORT_FILENAME}" ::: "${ARCHIVE}/${EXPORT_FILENAME_ARCHIVE}" "${STAGING_CANTOEXPORT}/${EXPORT_FILENAME_ARCHIVE}"
# Test parallel copying of canto_server_export_latest.json to local canto-space archive and (for testing purposes) to the origin folder
log
"Archiving
${
EXPORT_FILENAME
}
to
${
ARCHIVE
}
/
${
EXPORT_FILENAME_ARCHIVE
}
and
${
EXPORT_DIR
}
/
${
EXPORT_FILENAME_ARCHIVE
}
"
c
p
"
${
EXPORT_DIR
}
/
${
EXPORT_FILENAME
}
"
"
${
ARCHIVE
}
/
${
EXPORT_FILENAME_ARCHIVE
}
"
p
arallel
cp
-v
"
${
EXPORT_DIR
}
/
${
EXPORT_FILENAME
}
"
:::
"
${
ARCHIVE
}
/
${
EXPORT_FILENAME_ARCHIVE
}
"
"
${
EXPORT_DIR
}
/
${
EXPORT_FILENAME_ARCHIVE
}
"
log
"Finished"
...
...
This diff is collapsed.
Click to expand it.
Vitor Trovisco
@vmt25
mentioned in commit
042f3241
·
3 years ago
mentioned in commit
042f3241
mentioned in commit 042f324113419f8c612c8050b44c5f5389127b72
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment