Commit Graph

888 Commits

Author SHA1 Message Date
Emil Breiner
696fe6ca4b Introduce mariabackup helper-handler pair to Makefile
Change-Id: Ia7ad83272fd078c8b7197cedab2d8975ebbb192a
2020-11-18 15:21:58 +01:00
Emil Breiner
5db93e0321 rework mariabackup helper
The includes and excludes are split into different inputBoxes. Either one of them can be filled in. There is the possibility to leave them both empty resulting in a full backup.

Change-Id: I4fa4277906e1a3932356ec6980c200bb2f267375
2020-11-18 11:46:29 +01:00
Emil Breiner
0f37ed9807 make a structure dump of db's in mariabackup.handler
To make a partial restore of a database possible with mariabackup a structure dump is needed to create the necessary structure of the database before importing the files back to the data-dir of mariadb.

Change-Id: I7ec4250daaacd1b94dff81ceb02b7e0b587f90ca
2020-11-17 18:15:38 +01:00
Emil Breiner
e70b632c8e replace tabs with spaces for indent
Change-Id: Ia545b096ed318b7f304b39c973b4b04dfe2ab6cb
2020-11-17 14:16:47 +01:00
Emil Breiner
fb892788bc Fix of a bug in the execution of the exec string in mariaback_full.handler
$() did weird escaping of the include & exclude parameter, eval is evil but in this case needed.

Change-Id: I3ce56d07c9b9dfa6d76d2a1652773bfa62722c28
Signed-Off-By: Emil Breiner <emil.breiner@krumedia.com>
2020-10-13 17:31:39 +02:00
Emil Breiner
ca068a156e Rework of building the command string because of a bug in mariabackup_full.handler
Change-Id: Iadb84fdfc258a6153d82ba2ed484a1c9004f715e
2020-10-08 16:53:31 +02:00
Emil Breiner
af8db1f0b0 Fix of parameter name of mariaback_full.handler
Change-Id: I3460694b043e716bd7be72f2c6a0f3c59fb9e034
2020-10-08 12:31:54 +02:00
Emil Breiner
c5fdf3cd99 Adding defaults and correct the variable name of them in the mariaback_full.helper
Change-Id: I2609208d924a077ddc151b57348dd8d0cffea0e2
2020-10-08 12:31:22 +02:00
Emil Breiner
2e36f44c64 Stringify database includes & excludes
Database includes and excludes have to be strings because in case auf multiple databases in the variable mariabackup identifies the n'th database as parameter and throws an error.

Change-Id: Ibcaa73f809629dd0eb5fc303ab2d84e88f4c211a
2020-10-08 11:17:42 +02:00
Emil Breiner
29f200ae37 Consistency in naming of mariaback_full configuration
Change-Id: Ic67cf52f7833dfd6407f3621be8b8d7912667e72
2020-10-08 11:14:09 +02:00
Emil Breiner
62623c4065 Fix typo in setsection databases in mariabackup_full handler
Change-Id: Ibf09fed8998aacb33edc1d97dc0eb59d5c849062
2020-09-24 10:18:29 +02:00
Emil Breiner
9859f5a2cf Removing the shebang of mariabackup_full helper-handler pair because lintian doesn't like it
Change-Id: I6c6c1611fc83f444deb8860cab90df4ff3937157
2020-09-23 15:56:40 +02:00
Emil Breiner
913eab6ed3 Set correct permissions on config by the mariabackup_full.helper
The configuration created by the helper of mariaback_full had to much rights set. This sets the by backupninja needed rights on the configurations.

Change-Id: I9e042203bbfdb44fa9684398946e86ec394906aa
2020-09-23 15:42:17 +02:00
Emil Breiner
92c57a394c Set mariabackup/handler to exit on error because error handling is not implemented yet...
Change-Id: I42b393e65570b9c0589a8a0d452a5a4d47d8b8ae
2020-09-03 10:32:49 +02:00
Emil Breiner
cea0d4af54 Clearing out the target directory before the backup process starts
mariabackup fails if files from an old backup already exist in the target directory. There is no possibility of automate the pruning of old backups and cleaning up by mariabackup. Automating this process has to be done by the user.

Change-Id: Ifbd93bb58b1afecba5c1012ba6dc48cd3cebc90b
Signed-Off-By: Emil Breiner <emil.breiner@krumedia.com>
2020-09-03 10:20:57 +02:00
Emil Breiner
7b7f6b5dd6 initial commit for backupninja/mariabackup
Change-Id: Ib0d73d4acbb73da9e2e24b74899dd6da9cf43b0e
2020-09-02 17:01:18 +02:00
Jerome Charaoui
f9529d1d3f Remove zero-padding from nowday and whenday (fixes #9397)
This fixes cases where the day component of the when parameter resolved
to a non-zero padded integer under 10, such as "when = 1st at 01"

The comparison against the nowday variable failed consistently since
the date command format used always returned a zero-padded two digit
integer.

The solution chosen is to avoid generating nowday with zero-padding and
remove any zero-padding from whenday parameter using a more thorough
sed pattern which now also removes any non-alphanumeric characters from
the string.
2018-07-13 21:59:43 -04:00
Jerome Charaoui
a0f5063e8b Fix warning about malformed day component in 'when' 2018-07-13 10:09:14 -04:00
Jerome Charaoui
26521d0975 Whitespace fixes 2018-07-13 10:09:14 -04:00
Jerome Charaoui
d9ca93ab91 Use -V instead of -v as shorthand for --version
The capital-V is more common as shorthand for --version, since many
commandline tools use -v as a shorthand for --verbose.
2018-07-02 16:08:02 -04:00
lavamind
fa8301c924 Merge branch 'version_option' into 'master'
New option "--version"

See merge request riseuplabs/backupninja!18
2018-07-02 13:04:54 -07:00
Aurélien Olivier
b8432d9862 New option "--version"
At build time, we use the version number provided by configure.ac, which
is updated upstream when there is a new release.
2018-06-30 00:32:51 +02:00
Jerome Charaoui
623b777add Releasing backupninja 1.1.0 2018-06-29 12:01:44 -04:00
Jerome Charaoui
a67ed16da6 Add contributor credits in ChangeLog 2018-06-29 12:00:11 -04:00
Jerome Charaoui
232079aa31 Fix typo in .gitignore 2018-06-29 11:45:32 -04:00
Jerome Charaoui
a7fd43b94a Add Vagrantfile
This should help with testing development code and new releases. To use,
just install vagrant and run vagrant up && vagrant ssh
2018-06-29 11:43:12 -04:00
Jerome Charaoui
1e78c5b4a1 Update references to configure.in 2018-06-29 11:14:06 -04:00
Jerome Charaoui
3384388267 Change configure.in suffix to ".ac"
The former is deprecated, and automake complains
2018-06-29 10:54:29 -04:00
Jerome Charaoui
c3aa57bcdb Update ChangeLog and AUTHORS 2018-06-27 20:49:08 -04:00
lavamind
464b84dcfe Merge branch 'patch-1' into 'master'
Fixes for configuration files without suffix.

Closes #11287

See merge request riseuplabs/backupninja!16
2018-06-27 17:35:03 -07:00
lavamind
cc289f4c87 Merge branch 'master' into 'master'
Error out if cache directory does not exist when creating a fresh dup backup

See merge request riseuplabs/backupninja!15
2018-06-27 17:34:46 -07:00
Jerome Charaoui
1b1a857cbf Make sfdisk grep for luks headers more specific 2018-06-27 20:33:46 -04:00
lavamind
012dc70f60 Merge branch 'feature/support_luks_partitions' into 'master'
Support LUKS in disk partitions

See merge request riseuplabs/backupninja!13
2018-06-27 17:32:09 -07:00
lavamind
fb3b45343b Merge branch 'patch-1' into 'master'
Exclude zram devices, they don't have a partition table

See merge request riseuplabs/backupninja!12
2018-06-27 17:31:56 -07:00
lavamind
497ff73b65 Merge branch 'fix_11285' into 'master'
Attempt to sanitize the database identifiers, fix #11285

Closes #11285

See merge request riseuplabs/backupninja!11
2018-06-27 17:31:13 -07:00
lavamind
177b4267e9 Merge branch 'borg_support' into 'master'
Borg support (rebased)

See merge request riseuplabs/backupninja!10
2018-06-27 17:30:54 -07:00
Lyz
417394cf74
Changed /sed/@SED@/ 2018-06-25 16:31:16 +02:00
Jerome Charaoui
0d9b10890e [borg] use alternative repo ssh location syntax
This adds the ability to specify an alternative SSH port within
the host variable.
2018-06-06 22:03:24 -04:00
Jerome Charaoui
1efa23869c [borg] improve comments in example.borg 2018-06-06 22:03:19 -04:00
Jerome Charaoui
9c3dffa2cd [borg] "repofile" is not a valid encryption mode 2018-06-06 22:03:12 -04:00
David Gasaway
877b094d14 Fixes for configuration files without suffix. 2018-05-05 12:36:16 -07:00
Hugh Nowlan
4725d7835f Correct path 2018-04-30 13:47:30 +01:00
Hugh Nowlan
f2bc6d60aa Error out if archive dir doesn't exist 2018-04-30 12:59:21 +01:00
Lyz
469a3fd5ab
Support LUKS in disk partitions 2018-04-30 12:29:23 +02:00
Glandos
90d0b9ff63 Exclude zram devices, they don't have a partition table 2018-03-24 06:23:26 -07:00
Jerome Charaoui
bc9be0d576 Attempt to sanitize the database identifiers
Removing the quote and semicolon characters should be sufficient to
prevent breaking out of the shell command, but this may need reviewed
by someone more knowlegeable in shell scripting.
2018-03-16 16:52:39 -04:00
Jerome Charaoui
0132b2453a [borg] scrap exclude*, add create_options
This allows the handler to fully make use of the advanced command-line
options for "borg create", such as the replaced "exclude*" options and
others like "--read-special" and "--numeric-owner".
2018-01-26 11:47:47 -05:00
Jerome Charaoui
e114ff68f4 [borg] remove unnecessary test on $keep 2018-01-26 11:37:04 -05:00
Jerome Charaoui
e9824c0d7d [borg] enable BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK
Otherwise the handler may hang, waiting for user input. This may occur
when the borg cache is deleted, or when borg is upgraded.
2018-01-26 11:32:04 -05:00
Jerome Charaoui
f43c85662d [borg] replace "keep*" options with simpler "keep"
The effect of "keep*" options is not straightforward to understand, so
replacing it with a simpler "keep" option, which replicates the
functionality of other backupninja handlers. This also simplifies the
helper, as the use is then only asked how many days of backups to keep.

At the same time, we add "prune_options" which allows for the use of the
"keep*" options as well as other useful prune options, like "--prefix".
2018-01-26 11:26:37 -05:00