Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
b20eec16
Commit
b20eec16
authored
7 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Check that database backup exists
parent
57cc4001
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/freedombone-app-rss
+1
-7
1 addition, 7 deletions
src/freedombone-app-rss
src/freedombone-utils-backup
+8
-2
8 additions, 2 deletions
src/freedombone-utils-backup
with
9 additions
and
9 deletions
src/freedombone-app-rss
+
1
−
7
View file @
b20eec16
...
...
@@ -169,9 +169,7 @@ function restore_local_rss {
function_check get_mariadb_password
get_mariadb_password
function_check rss_create_database
rss_create_database
function_check restore_database
restore_database ttrss
if
[
-d
/etc/share/tt-rss
]
;
then
...
...
@@ -252,10 +250,6 @@ function restore_remote_rss {
get_mariadb_password
function_check restore_database_from_friend
function_check rss_create_database
rss_create_database
restore_database_from_friend ttrss
if
[
-d
/etc/share/tt-rss
]
;
then
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-utils-backup
+
8
−
2
View file @
b20eec16
...
...
@@ -583,7 +583,7 @@ function restore_database_from_friend {
DATABASE_PASSWORD
=
RESTORE_SUBDIR
=
"root"
if
[
-d
$SERVER_DIRECTORY
/backup/
${
1
}
]
;
then
if
[
-d
$SERVER_DIRECTORY
/backup/
${
1
}
data
]
;
then
database_file_extension
=
'sql'
if
[
$USE_MONGODB
]
;
then
database_file_extension
=
'mdb'
...
...
@@ -666,6 +666,9 @@ function restore_database_from_friend {
fi
fi
fi
else
echo
$"No database backup found for
${
1
}
"
exit
6239353
fi
}
...
...
@@ -674,7 +677,7 @@ function restore_database {
restore_app_name
=
$1
restore_app_domain
=
$2
if
[
-d
$USB_MOUNT
/backup/
${
restore_app_name
}
]
;
then
if
[
-d
$USB_MOUNT
/backup/
${
restore_app_name
}
data
]
;
then
echo
$"Restoring
${
restore_app_name
}
database"
local_database_dir
=
/root/temp
${
restore_app_name
}
data
if
[
-d
${
local_database_dir
}
]
;
then
...
...
@@ -776,6 +779,9 @@ function restore_database {
fi
fi
fi
else
echo
$"No database backup found for
${
restore_app_name
}
"
exit
7357224
fi
}
...
...
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