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
Model registry
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
lyz
backupninja
Commits
230c96d9
Commit
230c96d9
authored
13 years ago
by
rhatto
Browse files
Options
Downloads
Patches
Plain Diff
Update increment folder date (#3929)
parent
c9aa8b1d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
handlers/rsync.in
+8
-0
8 additions, 0 deletions
handlers/rsync.in
with
8 additions
and
0 deletions
handlers/rsync.in
+
8
−
0
View file @
230c96d9
...
@@ -447,6 +447,8 @@ function rotate_long {
...
@@ -447,6 +447,8 @@ function rotate_long {
echo
"Debug: daily.
$max
--> weekly.1"
echo
"Debug: daily.
$max
--> weekly.1"
$nice
mv
$backuproot
/daily.
$max
$backuproot
/weekly.1
$nice
mv
$backuproot
/daily.
$max
$backuproot
/weekly.1
mkdir
-p
$backuproot
/metadata/weekly.1
mkdir
-p
$backuproot
/metadata/weekly.1
# Update increment folder date and setup metadata
$touch
$backuproot
/weekly.1
date
+%c%n%s
>
$backuproot
/metadata/weekly.1/rotated
date
+%c%n%s
>
$backuproot
/metadata/weekly.1/rotated
#if [ -f $backuproot/metadata/daily.$max/created ]; then
#if [ -f $backuproot/metadata/daily.$max/created ]; then
# $nice mv $backuproot/metadata/daily.$max/created $backuproot/metadata/weekly.1/
# $nice mv $backuproot/metadata/daily.$max/created $backuproot/metadata/weekly.1/
...
@@ -458,6 +460,8 @@ function rotate_long {
...
@@ -458,6 +460,8 @@ function rotate_long {
echo
"Debug: weekly.
$max
--> monthly.1"
echo
"Debug: weekly.
$max
--> monthly.1"
$nice
mv
$backuproot
/weekly.
$max
$backuproot
/monthly.1
$nice
mv
$backuproot
/weekly.
$max
$backuproot
/monthly.1
mkdir
-p
$backuproot
/metadata/monthly.1
mkdir
-p
$backuproot
/metadata/monthly.1
# Update increment folder date and setup metadata
$touch
$backuproot
/monthly.1
date
+%c%n%s
>
$backuproot
/metadata/monthly.1/rotated
date
+%c%n%s
>
$backuproot
/metadata/monthly.1/rotated
#if [ -f $backuproot/metadata/weekly.$max/created ]; then
#if [ -f $backuproot/metadata/weekly.$max/created ]; then
# $nice mv $backuproot/metadata/weekly.$max/created $backuproot/metadata/weekly.1/
# $nice mv $backuproot/metadata/weekly.$max/created $backuproot/metadata/weekly.1/
...
@@ -565,6 +569,8 @@ function rotate_long_remote {
...
@@ -565,6 +569,8 @@ function rotate_long_remote {
echo "Debug: daily.
\$
max --> weekly.1"
echo "Debug: daily.
\$
max --> weekly.1"
$nice
mv
$backuproot
/daily.
\$
max
$backuproot
/weekly.1
$nice
mv
$backuproot
/daily.
\$
max
$backuproot
/weekly.1
mkdir -p
$backuproot
/metadata/weekly.1
mkdir -p
$backuproot
/metadata/weekly.1
# Update increment folder date and setup metadata
$touch
$backuproot
/weekly.1
date +%c%n%s >
$backuproot
/metadata/weekly.1/rotated
date +%c%n%s >
$backuproot
/metadata/weekly.1/rotated
#if [ -f
$backuproot
/metadata/daily.
\$
max/created ]; then
#if [ -f
$backuproot
/metadata/daily.
\$
max/created ]; then
#
$nice
mv
$backuproot
/metadata/daily.
\$
max/created
$backuproot
/metadata/weekly.1/
#
$nice
mv
$backuproot
/metadata/daily.
\$
max/created
$backuproot
/metadata/weekly.1/
...
@@ -576,6 +582,8 @@ function rotate_long_remote {
...
@@ -576,6 +582,8 @@ function rotate_long_remote {
echo "Debug: weekly.
\$
max --> monthly.1"
echo "Debug: weekly.
\$
max --> monthly.1"
$nice
mv
$backuproot
/weekly.
\$
max
$backuproot
/monthly.1
$nice
mv
$backuproot
/weekly.
\$
max
$backuproot
/monthly.1
mkdir -p
$backuproot
/metadata/monthly.1
mkdir -p
$backuproot
/metadata/monthly.1
# Update increment folder date and setup metadata
$touch
$backuproot
/monthly.1
date +%c%n%s >
$backuproot
/metadata/monthly.1/rotated
date +%c%n%s >
$backuproot
/metadata/monthly.1/rotated
#if [ -f
$backuproot
/metadata/weekly.
\$
max/created ]; then
#if [ -f
$backuproot
/metadata/weekly.
\$
max/created ]; then
#
$nice
mv
$backuproot
/metadata/weekly.
\$
max/created
$backuproot
/metadata/weekly.1/
#
$nice
mv
$backuproot
/metadata/weekly.
\$
max/created
$backuproot
/metadata/weekly.1/
...
...
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