Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-mysqlbackend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-mysqlbackend
Commits
f5b06149
Commit
f5b06149
authored
5 years ago
by
Daniel
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: Moved `backup.sh` into `utils` directory
parent
c2da7cf0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
utils/backup.sh
+4
-4
4 additions, 4 deletions
utils/backup.sh
with
4 additions
and
4 deletions
backup.sh
→
utils/
backup.sh
+
4
−
4
View file @
f5b06149
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
# The directory which the dump is to be stored to. Do not change it here. Use
# The directory which the dump is to be stored to. Do not change it here. Use
# the --backupdir=./my/dir/ option or an environment variable instead.
# the --backupdir=./my/dir/ option or an environment variable instead.
BACKUPDIR
=
"
${
BACKUPDIR
:-
./backup
}
"
BACKUPDIR
=
"
${
BACKUPDIR
:-
.
.
/backup
}
"
# Iff this (environment) variable is "true" as lower-case, then this script also
# Iff this (environment) variable is "true" as lower-case, then this script also
# outputs a machine readable status report. The variable can also be set by
# outputs a machine readable status report. The variable can also be set by
# giving the `--yaml` command line option.
# giving the `--yaml` command line option.
...
@@ -59,10 +59,10 @@ EOF
...
@@ -59,10 +59,10 @@ EOF
# Config and command line parameter loading ###################################
# Config and command line parameter loading ###################################
.
.config
.
../
.config
# load useful stuff - parses the commandline parameters and so on...
# load useful stuff - parses the commandline parameters and so on...
.
patches/utils/patch_header.sh
.
../
patches/utils/patch_header.sh
echo
"BACKUPDIR:
$BACKUPDIR
"
echo
"BACKUPDIR:
$BACKUPDIR
"
echo
"YAML:
$YAML
"
echo
"YAML:
$YAML
"
...
@@ -105,7 +105,7 @@ function yaml_success() {
...
@@ -105,7 +105,7 @@ function yaml_success() {
#rm dumpfile.tmp
#rm dumpfile.tmp
# create backup dir if not exists
# create backup dir if not exists
[
-d
"
$BACKUPDIR
"
]
||
mkdir
"
$BACKUPDIR
"
||
mkdir
-p
"
$BACKUPDIR
"
DATE
=
$(
date
-u
--rfc-3339
=
ns |
sed
's/ /T/g'
)
DATE
=
$(
date
-u
--rfc-3339
=
ns |
sed
's/ /T/g'
)
BACKUPFILE
=
${
BACKUPDIR
}
/
${
DATABASE_NAME
}
.
${
DATE
}
.dump.sql
BACKUPFILE
=
${
BACKUPDIR
}
/
${
DATABASE_NAME
}
.
${
DATE
}
.dump.sql
...
...
This diff is collapsed.
Click to expand it.
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