Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
backupninja
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository 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
raT
backupninja
Commits
38a0fc57
Commit
38a0fc57
authored
12 years ago
by
intrigeri
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'sarava/bug/3838'
parents
64b4d1c9
a9942162
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/example.rsync
+0
-5
0 additions, 5 deletions
examples/example.rsync
handlers/rsync.in
+0
-44
0 additions, 44 deletions
handlers/rsync.in
with
0 additions
and
49 deletions
examples/example.rsync
+
0
−
5
View file @
38a0fc57
...
...
@@ -74,11 +74,6 @@ days = 7
# for long storage format, specify the number of monthly backup increments
#keepmonthly = 1
# use this if you need a lockfile to be kept during backup execution
# this is an useful feature in case you have some tasks that should
# know if the backup is running or not
#lockfile =
# rsync command nice level
#nicelevel = 0
...
...
This diff is collapsed.
Click to expand it.
handlers/rsync.in
+
0
−
44
View file @
38a0fc57
...
...
@@ -39,7 +39,6 @@
# keepdaily = for long storage format, specify the number of daily backup increments
# keepweekly = for long storage format, specify the number of weekly backup increments
# keepmonthly = for long storage format, specify the number of monthly backup increments
# lockfile = lockfile to be kept during backup execution
# nicelevel = rsync command nice level
# enable_mv_timestamp_bug = set to "yes" if your system isnt handling timestamps correctly
# tmp = temp folder
...
...
@@ -129,7 +128,6 @@ function eval_config {
getconf keepdaily 5
getconf keepweekly 3
getconf keepmonthly 1
getconf lockfile
getconf nicelevel 0
getconf enable_mv_timestamp_bug no
getconf tmp /tmp
...
...
@@ -883,45 +881,6 @@ function test_connect {
}
function
set_lockfile
{
if
[
!
-z
"
$lockfile
"
]
;
then
mkdir
-p
`
dirname
$lockfile
`
if
(
set
-o
noclobber
;
echo
"
$$
"
>
"
$lockfile
"
)
&> /dev/null
;
then
trap
'unset_lockfile'
INT TERM EXIT
else
fatal
"Could not create lockfile
$lockfile
, exiting"
fi
fi
}
function
unset_lockfile
{
if
[
!
-z
"
$lockfile
"
]
;
then
$rm
-f
$lockfile
||
warning
"Could not remove lockfile
$lockfile
"
fi
}
function
check_lockfile
{
local
pid process
if
[
!
-z
"
$lockfile
"
]
&&
[
-f
"
$lockfile
"
]
;
then
pid
=
"
`
cat
$lockfile
`
"
process
=
"
`
ps
--no-headers
-o
comm
$pid
`
"
if
[
"
$?
"
==
"0"
]
&&
[
"
`
ps
--no-headers
-o
comm
$$
`
"
==
"
$process
"
]
;
then
info
"Another backup is running for
$lockfile
, skipping run"
exit
else
info
"Found old lockfile
$lockfile
, removing it"
unset_lockfile
fi
fi
}
function
set_filelist
{
filelist_flag
=
""
...
...
@@ -1111,8 +1070,6 @@ function end_mux {
# the backup procedure
eval_config
check_lockfile
set_lockfile
set_rsync_options
start_mux
stop_services
...
...
@@ -1144,7 +1101,6 @@ done
mount_ro
run_fsck
start_services
unset_lockfile
end_mux
echo
"Finnishing backup at
`
date
`
"
>>
$log
...
...
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