Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iml-backup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
IML Open Source
iml-backup
Commits
77509b75
Commit
77509b75
authored
3 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
update docs (WIP)
parent
1436f821
Branches
Branches containing commit
No related tags found
1 merge request
!26
Eliminate scheduler
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/30_Configuration/10_Database.md
+4
-4
4 additions, 4 deletions
docs/30_Configuration/10_Database.md
docs/30_Configuration/10_backup.job.md
+128
-51
128 additions, 51 deletions
docs/30_Configuration/10_backup.job.md
with
132 additions
and
55 deletions
docs/30_Configuration/10_Database.md
+
4
−
4
View file @
77509b75
...
...
@@ -29,18 +29,18 @@ Below that one a directory for the service will be generated; inside that one th
The number of days how long to keep dumps locally.
Remark:
To make a database restore its dump must be located at this directory.
To restore an older database you need to restore the dump from duplicity first.
To make a database restore its dump must be located at this directory.
If you have local Mysql daemon or Pgsql you can test it by starting
To restore an older database you need to restore the dump from the filke backup first.
If you have local Mysql daemon or Pgsql you can test it by starting
```
# dump all databases
sudo ./localdump.sh
```
```
# show written files
find /var/iml-backup
```
This diff is collapsed.
Click to expand it.
docs/30_Configuration/10_backup.job.md
+
128
−
51
View file @
77509b75
...
...
@@ -2,10 +2,7 @@
```
# ----------------------------------------------------------------------
#
# jobfile backup.job for scheduling
#
# ----------------------------------------------------------------------
# jobfile backup.job for scheduling local dumps
#
# SYNTAX:
# [variable] = [value]
...
...
@@ -16,35 +13,39 @@
#
# ----------------------------------------------------------------------
lang = en_us
# ----------------------------------------------------------------------
# backup type; one of auto|inc
# inc: incremetal and full backups if started on cofigured times
# auto: automatic; =incermental backups; duplicity can start a full
# backup if the last one is older a given range
# ----------------------------------------------------------------------
# type = inc
type = auto
lang = en_us
# ----------------------------------------------------------------------
# scheduling for incremental backup and full backup
# scheduling for full backup
# type = inc only
# for inc and full you can set
# DOM:06,22 - days of month
# DOW:Mon,Fri - weekdays
# WDM:1st Fri
- nth weekday in month
#
WDM:
WDM:1st Fri - nth weekday in month
# ----------------------------------------------------------------------
inc = DOW:Mon,Tue,Wed,Thu,Fri,Sat,Sun
# full = WDM:3rd Fri
# full backups for type = inc
full = WDM:3rd Fri
# when to start a full backup?
# regex that must match a time HH:MM somewhen
# This will start it if backup ist started between 23:00:00 and 23:09:59
# start-time-full = 23:0.
# full backups for type = auto
# ----------------------------------------------------------------------
# full backups for type = auto AND when using duplicity
# ----------------------------------------------------------------------
# auto = <time> i.e. 1M
auto = 1M
# --- when to start every day?
# incremental jobs
# time HHMM ... multiple values with separated with "," and sorted
# 10:00,12:00,14:00,16:00,18:00
start-time-inc = 20:00
start-time-full = 20:00
# auto = 1M
# ----------------------------------------------------------------------
...
...
@@ -59,6 +60,7 @@ keep-days = 7
dir-dbarchive = /var/localdumps/archive
# ----------------------------------------------------------------------
```
# Description #
...
...
@@ -101,7 +103,7 @@ see also **dir-localdumps**
## full ##
Scheduling days for full backup
For inc and full y
ou can set
Y
ou can set
*
day of month: DOM
*
weekday: DOW
...
...
@@ -121,16 +123,7 @@ Examples:
`full = WDM:3rd Fri`
See also:
**inc**
,
**start-time-full**
## inc ##
Scheduling days for incremental backup.
For valid values see description for
**full**
`inc = DOW:Mon,Tue,Wed,Thu,Fri,Sat,Sun`
See also:
**full**
,
**start-time-inc**
See also:
**start-time-full**
## lang ##
...
...
@@ -141,44 +134,128 @@ Language of the shell. Do not change to keep documented keywords for date and ti
Time when to start an incrmental backup. This value will be handled
if a day matches
**full**
only.
Values are HHMM ... multiple values with separated with
`,`
and must be sorted.
The value of start-time-full is a regex then must match a time HH:MM somewhen
to start a full backup.
If a full time matches an incremental time then full has priority.
This will start it if backup ist started between 23:00:00 and 23:09:59:
`start-time-full= 2
2
:0
0
`
`start-time-full= 2
3
:0
.
`
see also
**full**
## start-time-inc ##
Time when to start an incrmental backup. This value will be handled
if a day matches
**inc**
only.
Values are HHMM ... multiple values with separated with
`,`
and must be sorted
If a full time matches an incremental time then full has priority.
`start-time-inc = 10:00,12:00,14:00,16:00,18:00`
## type ##
se
e al
so
**
inc
**
Type of backup. Th
e
v
al
ue is one of auto|
inc
## type ##
*
inc: incremetal and full backups if started on cofigured times
*
auto: automatic; =incermental backups; duplicity can start a full backup if the last one is older a given range
T
ype of
backup.
T
his setting depends on the possibilities of the used
backup
tool
.
Restic:
*
set to "auto"
*
set to "auto"
only
Duplicity:
Duplicity supports 2 modes.
*
"inc" - make full and incremental backups defined times. You need more values:
*
full = WDM:3rd Fri
*
inc = DOW:Mon,Tue,Wed,Thu,Fri,Sat,Sun
*
start-time-full = 20:00
*
start-time-full = 23:0.
*
"auto" - starts incremental backups as long last full backup is not older value in
*
auto = 1M
`type = auto`
see also
**bin**
## Example: Restic ##
```
text
lang = en_us
type = auto
# ----------------------------------------------------------------------
# local dumps; each service has its own subdir there
# this entry is mapped to BACKUP_TARGETDIR in "localdump.sh"
# ----------------------------------------------------------------------
dir-localdumps = /var/localdumps/backup
keep-days = 7
# archive databases (to keep deleted schemes or databases that
# are not backupped anymore; couchdb2 feature)
dir-dbarchive = /var/localdumps/archive
```
## Example: Duplicity ##
### Full backups on a specified time ###
This can be used on servers where you want to define when the full
backup must be started.
```
text
lang = en_us
type = inc
# ----------------------------------------------------------------------
# scheduling for full backup
# type = inc only
# for inc and full you can set
# DOM:06,22 - days of month
# DOW:Mon,Fri - weekdays
# WDM:WDM:1st Fri - nth weekday in month
# ----------------------------------------------------------------------
full = WDM:3rd Fri
# when to start a full backup?
# regex that must match a time HH:MM somewhen
# This will start it if backup ist started between 23:00:00 and 23:09:59
start-time-full = 23:0.
# ----------------------------------------------------------------------
# local dumps; each service has its own subdir there
# this entry is mapped to BACKUP_TARGETDIR in "localdump.sh"
# ----------------------------------------------------------------------
dir-localdumps = /var/localdumps/backup
keep-days = 7
# archive databases (to keep deleted schemes or databases that
# are not backupped anymore; couchdb2 feature)
dir-dbarchive = /var/localdumps/archive
```
### Full backups after a month ###
This can be used on client backups. A full backup automatically starts
if the last backup is older a given time.
```
text
lang = en_us
type = auto
# ----------------------------------------------------------------------
# full backups for type = auto AND when using duplicity
# ----------------------------------------------------------------------
# auto = <time> i.e. 1M
auto = 1M
# ----------------------------------------------------------------------
# local dumps; each service has its own subdir there
# this entry is mapped to BACKUP_TARGETDIR in "localdump.sh"
# ----------------------------------------------------------------------
dir-localdumps = /var/localdumps/backup
keep-days = 7
# archive databases (to keep deleted schemes or databases that
# are not backupped anymore; couchdb2 feature)
dir-dbarchive = /var/localdumps/archive
```
\ No newline at end of file
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