Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
git-backup
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Alain Takoudjou
git-backup
Commits
a03195de
Commit
a03195de
authored
Apr 18, 2018
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gitlab-backup: don't keep backup_gitlab.pulled files
parent
c4d4e857
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
+25
-4
contrib/gitlab-backup
contrib/gitlab-backup
+25
-4
No files found.
contrib/gitlab-backup
View file @
a03195de
...
...
@@ -104,6 +104,7 @@ need_gitlab_config() {
# pull gitlab data into git-backup repository
backup_pull
()
{
keep_pulled_backup
=
$1
need_gitlab_config
# 1. dump all gitlab data except repositories & db
...
...
@@ -210,8 +211,13 @@ backup_pull() {
echo
" * git-backup pull everything"
$GIT_BACKUP
pull
"
$tmpd
/gitlab_backup:gitlab/misc"
$GITLAB_REPOS_PATH
:gitlab/repo
# mark backup_tar as pulled and cleanup
mv
"
$backup_tar
"
"
$backup_tar
.pulled"
if
[
"
$keep_pulled_backup
"
==
"n"
]
;
then
# remove pulled as they are not needed
rm
-f
"
$backup_tar
"
else
# mark backup_tar as pulled and cleanup
mv
"
$backup_tar
"
"
$backup_tar
.pulled"
fi
rm
-rf
"
$tmpd
"
echo
OK
...
...
@@ -387,7 +393,7 @@ umask 0077 # XXX maybe not good - e.g. git-data/repositories should (?) be rw
usage
()
{
echo
"Usage: gitlab-backup [pull | restore (-vupok, -go) <commit-ish>]"
echo
"Usage: gitlab-backup [pull
(-keep)
| restore (-vupok, -go) <commit-ish>]"
}
...
...
@@ -397,7 +403,22 @@ shift
case
"
$action
"
in
pull
)
backup_pull
keep
=
n
# keep pulled gitlab backup data
while
test
$#
!=
0
;
do
case
"
$1
"
in
-keep
)
keep
=
y
;;
-
*
)
die
`
usage
`
;;
*
)
break
;;
esac
shift
done
backup_pull
$keep
;;
restore
)
vupok
=
n
# gitlab version >= backup's gitlab version is ok
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment