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
ee157c92
Commit
ee157c92
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Move remote gogs backup to app script
parent
eaa7baba
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-gogs
+36
-2
36 additions, 2 deletions
src/freedombone-app-gogs
src/freedombone-backup-remote
+0
-26
0 additions, 26 deletions
src/freedombone-backup-remote
with
36 additions
and
28 deletions
src/freedombone-app-gogs
+
36
−
2
View file @
ee157c92
...
...
@@ -38,7 +38,7 @@ GIT_ADMIN_PASSWORD=
GOGS_COMMIT
=
'3fb4f7f4980b4339fd9ef6a3ba5b0acab83d264d'
function
reconfigure_gogs
{
echo
-n
''
echo
-n
''
}
function
upgrade_gogs
{
...
...
@@ -146,7 +146,41 @@ function restore_local_gogs {
}
function
backup_remote_gogs
{
echo
-n
''
export
GVM_ROOT
=
/home/git/gvm
if
[
-d
$GVM_ROOT
/bin
]
;
then
cd
$GVM_ROOT
/bin
[[
-s
"
$GVM_ROOT
/scripts/gvm"
]]
&&
source
"
$GVM_ROOT
/scripts/gvm"
gvm use go
${
GO_VERSION
}
--default
systemctl set-environment
GOPATH
=
$GOPATH
fi
if
[
-d
$GOPATH
/src/github.com/gogits
]
;
then
GIT_DOMAIN_NAME
=
$(
cat
$COMPLETION_FILE
|
grep
"Gogs domain"
|
awk
-F
':'
'{print $2}'
)
function_check suspend_site
suspend_site
${
GIT_DOMAIN_NAME
}
function_check backup_database_to_friend
backup_database_to_friend gogs
echo
$"Obtaining Gogs settings backup"
function_check backup_directory_to_friend
backup_directory_to_friend
$GOPATH
/src/github.com/gogits/gogs/custom gogs
echo
$"Obtaining Gogs repos backup"
mv
/home/git/gogs-repositories/
*
.git /home/git/gogs-repositories/bob
backup_directory_to_friend /home/git/gogs-repositories gogsrepos
echo
$"Obtaining Gogs authorized_keys backup"
backup_directory_to_friend /home/git/.ssh gogsssh
function_check restart_site
restart_site
echo
$"Gogs backup complete"
fi
}
function
restore_remote_gogs
{
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-backup-remote
+
0
−
26
View file @
ee157c92
...
...
@@ -244,31 +244,6 @@ function backup_tor {
fi
}
function
backup_gogs
{
export
GVM_ROOT
=
/home/git/gvm
if
[
-d
$GVM_ROOT
/bin
]
;
then
cd
$GVM_ROOT
/bin
[[
-s
"
$GVM_ROOT
/scripts/gvm"
]]
&&
source
"
$GVM_ROOT
/scripts/gvm"
gvm use go
${
GO_VERSION
}
--default
systemctl set-environment
GOPATH
=
$GOPATH
fi
if
[
-d
$GOPATH
/src/github.com/gogits
]
;
then
GIT_DOMAIN_NAME
=
$(
cat
$COMPLETION_FILE
|
grep
"Gogs domain"
|
awk
-F
':'
'{print $2}'
)
suspend_site
${
GIT_DOMAIN_NAME
}
backup_database_to_friend gogs
backup_directory_to_friend /root/tempgogsdata gogsdata
echo
$"Obtaining Gogs settings backup"
backup_directory_to_friend
$GOPATH
/src/github.com/gogits/gogs/custom gogs
echo
$"Obtaining Gogs repos backup"
mv
/home/git/gogs-repositories/
*
.git /home/git/gogs-repositories/bob
backup_directory_to_friend /home/git/gogs-repositories gogsrepos
echo
$"Obtaining Gogs authorized_keys backup"
backup_directory_to_friend /home/git/.ssh gogsssh
restart_site
fi
}
function
backup_wiki
{
if
[
-d
/etc/dokuwiki
]
;
then
echo
$"Backing up wiki"
...
...
@@ -514,7 +489,6 @@ if [[ $TEST_MODE == "no" ]]; then
backup_admin_readme
backup_mariadb
backup_gogs
backup_wiki
backup_blog
backup_certs
...
...
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