backupninja issueshttps://0xacab.org/liberate/backupninja/-/issues2022-11-26T05:49:19Zhttps://0xacab.org/liberate/backupninja/-/issues/9806rsync handler fails when trying to include paths with spaces2022-11-26T05:49:19ZGhost Userrsync handler fails when trying to include paths with spacesfirst, thank you for backupninja and such a useful set of handlers. i've been using it for years with only minor issues.
however, i am now bumping into a problem with the rsync handler when i try to set:
include = /srv/share/Videos/TV ...first, thank you for backupninja and such a useful set of handlers. i've been using it for years with only minor issues.
however, i am now bumping into a problem with the rsync handler when i try to set:
include = /srv/share/Videos/TV Shows
the rsync backend incorrectly splits this into attempts to backup //srv/share/Videos/TV/ and /Shows/ (debug output below). i've tried quotes and backslashes to no better effect.
please let me know if there is any additional information that would be useful.
thanks again!
<pre>
% sudo backupninja --debug --test --run /etc/backup.d/99.rsync
Debug: check_perms /etc/backup.d
Debug: perms: drwxrwx---
Debug: gperm: rwx
Debug: wperm: ---
Debug: check_perms /etc/backup.d/99.rsync
Debug: perms: -rw-------
Debug: gperm: ---
Debug: wperm: ---
Info: >>>> starting action /etc/backup.d/99.rsync (because of --now)
Debug: yes
Debug: executing handler in locked section controlled by /var/lock/backupninja/_etc_backup.d_99.rsync
Info: Syncing /srv/share/Videos/TV on /srv/backups/rsync/gondolin//srv/share/Videos/TV/TV.0/...
Debug: nice -n 0 su -c /usr/bin/rsync -av --delete --recursive --dry-run --delete-excluded //srv/share/Videos/TV/ /srv/backups/rsync/gondolin//srv/share/Videos/TV/TV.0/
X11 connection rejected because of wrong authentication.
sending incremental file list
rsync: change_dir "//srv/share/Videos/TV" failed: Not a directory (20)
created directory /srv/backups/rsync/gondolin//srv/share/Videos/TV/TV.0
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]
sent 20 bytes received 88 bytes 216.00 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
Warning: Rsync error 23 when trying to transfer /srv/share/Videos/TV
Info: Syncing Shows on /srv/backups/rsync/gondolin/Shows/Shows.0/...
Debug: nice -n 0 su -c /usr/bin/rsync -av --delete --recursive --dry-run --delete-excluded /Shows/ /srv/backups/rsync/gondolin/Shows/Shows.0/
X11 connection rejected because of wrong authentication.
sending incremental file list
rsync: change_dir "/Shows" failed: No such file or directory (2)
created directory /srv/backups/rsync/gondolin/Shows/Shows.0
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]
sent 20 bytes received 76 bytes 192.00 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
Warning: Rsync error 23 when trying to transfer Shows
Warning: <<<< finished action /etc/backup.d/99.rsync: WARNING
Debug: send report to root
Info: FINISHED: 1 actions run. 0 fatal. 0 error. 2 warning.
</pre>
*(from redmine: created on 2015-07-24)*rhattorhattohttps://0xacab.org/liberate/backupninja/-/issues/11332duplicity helper does not allow choosing src2022-03-05T18:58:42ZAndrew Bezelladuplicity helper does not allow choosing srcwith backupninja 1.2.1 the Duplicity action wizard fails to enter the "src" step. selecting "src" and pressing "Enter" does not have any effect.with backupninja 1.2.1 the Duplicity action wizard fails to enter the "src" step. selecting "src" and pressing "Enter" does not have any effect.https://0xacab.org/liberate/backupninja/-/issues/11333sys handler creates LUKS header backup file once then fails2022-03-05T18:48:58ZAndrew Bezellasys handler creates LUKS header backup file once then failswith backupninja 1.2.1 when the `luksheaders` option is set to yes, the `sys` handler attempts to create a header backup file. on the first run this succeeds, but then all future attempts fail:
```
Debug: /usr/sbin/cryptsetup will try t...with backupninja 1.2.1 when the `luksheaders` option is set to yes, the `sys` handler attempts to create a header backup file. on the first run this succeeds, but then all future attempts fail:
```
Debug: /usr/sbin/cryptsetup will try to backup the LUKS header for device /dev/nvme0n1p3
Debug: /usr/sbin/cryptsetup luksHeaderBackup "/dev/nvme0n1p3" --header-backup-file "/var/backups/luksheader.nvme0n1p3.bin"
Debug: Requested header backup file /var/backups/luksheader.nvme0n1p3.bin already exists.
Fatal: The LUKS header of /dev/nvme0n1p3 could not be saved.
```
the other portions of the `sys` handler simply overwrite existing output files. should the `luksheaders` portion of the code simply remove the `outputfile` prior to running `cryptsetup`? i can provide a patch/MR if sohttps://0xacab.org/liberate/backupninja/-/issues/11303[sys handler] MBR backups include loopback devices mounted by snaps2021-01-25T17:40:40ZVarac[sys handler] MBR backups include loopback devices mounted by snapsI have some snaps installed on ubuntu and using `mbr = yes` results in too many unwanted mbr backups:
```
Debug: Will try to backup MBR tables for device /dev/loop0
Debug: /bin/dd if=/dev/loop0 of=/var/backups/mbr.loop0.bin bs=512 count...I have some snaps installed on ubuntu and using `mbr = yes` results in too many unwanted mbr backups:
```
Debug: Will try to backup MBR tables for device /dev/loop0
Debug: /bin/dd if=/dev/loop0 of=/var/backups/mbr.loop0.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop1
Debug: /bin/dd if=/dev/loop1 of=/var/backups/mbr.loop1.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop2
Debug: /bin/dd if=/dev/loop2 of=/var/backups/mbr.loop2.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop3
Debug: /bin/dd if=/dev/loop3 of=/var/backups/mbr.loop3.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop4
Debug: /bin/dd if=/dev/loop4 of=/var/backups/mbr.loop4.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop5
Debug: /bin/dd if=/dev/loop5 of=/var/backups/mbr.loop5.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop6
Debug: /bin/dd if=/dev/loop6 of=/var/backups/mbr.loop6.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop7
Debug: /bin/dd if=/dev/loop7 of=/var/backups/mbr.loop7.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/sda
Debug: /bin/dd if=/dev/sda of=/var/backups/mbr.sda.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/mapper/sda5_crypt
Debug: /bin/dd if=/dev/mapper/sda5_crypt of=/var/backups/mbr.mapper-sda5_crypt.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/mapper/ubuntu--vg-root
Debug: /bin/dd if=/dev/mapper/ubuntu--vg-root of=/var/backups/mbr.mapper-ubuntu--vg-root.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/mapper/ubuntu--vg-swap_1
Debug: /bin/dd if=/dev/mapper/ubuntu--vg-swap_1 of=/var/backups/mbr.mapper-ubuntu--vg-swap_1.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/mapper/ubuntu--vg-home
Debug: /bin/dd if=/dev/mapper/ubuntu--vg-home of=/var/backups/mbr.mapper-ubuntu--vg-home.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop8
Debug: /bin/dd if=/dev/loop8 of=/var/backups/mbr.loop8.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop9
Debug: /bin/dd if=/dev/loop9 of=/var/backups/mbr.loop9.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop10
Debug: /bin/dd if=/dev/loop10 of=/var/backups/mbr.loop10.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop11
Debug: /bin/dd if=/dev/loop11 of=/var/backups/mbr.loop11.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop12
Debug: /bin/dd if=/dev/loop12 of=/var/backups/mbr.loop12.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop13
Debug: /bin/dd if=/dev/loop13 of=/var/backups/mbr.loop13.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop14
Debug: /bin/dd if=/dev/loop14 of=/var/backups/mbr.loop14.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop15
Debug: /bin/dd if=/dev/loop15 of=/var/backups/mbr.loop15.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop16
Debug: /bin/dd if=/dev/loop16 of=/var/backups/mbr.loop16.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop17
Debug: /bin/dd if=/dev/loop17 of=/var/backups/mbr.loop17.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop18
Debug: /bin/dd if=/dev/loop18 of=/var/backups/mbr.loop18.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop19
Debug: /bin/dd if=/dev/loop19 of=/var/backups/mbr.loop19.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop20
Debug: /bin/dd if=/dev/loop20 of=/var/backups/mbr.loop20.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop21
Debug: /bin/dd if=/dev/loop21 of=/var/backups/mbr.loop21.bin bs=512 count=1 2>/dev/null
Debug: Will try to backup MBR tables for device /dev/loop22
Debug: /bin/dd if=/dev/loop22 of=/var/backups/mbr.loop22.bin bs=512 count=1 2>/dev/null
…
```
These loopback devices are created by snaps:
```
# mount | grep snap
/var/lib/snapd/snaps/shellcheck_797.snap on /snap/shellcheck/797 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/chromium_937.snap on /snap/chromium/937 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/atom_238.snap on /snap/atom/238 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/subliminal-subtitles_34.snap on /snap/subliminal-subtitles/34 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-28-1804_91.snap on /snap/gnome-3-28-1804/91 type squashfs (ro,nodev,relatime,x-gdu.hide)
…
```1.2.1https://0xacab.org/liberate/backupninja/-/issues/11294[redhat] error "/usr/local/share/backupninja/sys: ligne 265 : [: too many arg...2021-01-13T08:55:56ZNima[redhat] error "/usr/local/share/backupninja/sys: ligne 265 : [: too many arguments"Hello,
I ran into errors testing backupninja on RedHat (RHEL7):
> /usr/local/share/backupninja/sys: ligne 265 : [: too many arguments
> /usr/local/share/backupninja/sys: ligne 270 : [: too many arguments
This patch on `handlers/sys`...Hello,
I ran into errors testing backupninja on RedHat (RHEL7):
> /usr/local/share/backupninja/sys: ligne 265 : [: too many arguments
> /usr/local/share/backupninja/sys: ligne 270 : [: too many arguments
This patch on `handlers/sys` seems to solve this issue:
```
--- handlers/sys 2018-09-10 11:40:34.781597844 +0200
+++ /usr/local/share/backupninja/sys 2018-09-10 12:14:48.270597844 +0200
@@ -310,7 +310,7 @@
if [ $os = "redhat" ]; then
catifexec "/sbin/chkconfig" "--list"
STATUS="Collecting information about /etc/rc.d:"
- catiffile "/bin/ls /etc/rc.d/rc*.d/"
+ catiffile $(/bin/ls /etc/rc.d/rc*.d/)
elif [ $os = "debian" ]; then
for level in 0 1 2 3 4 5 6 S; do
```
Regards,1.2.0-rc1JulienJulienhttps://0xacab.org/liberate/backupninja/-/issues/11271.sys-Handler trying to use `debconf-get-selections` on CentOS 72021-01-13T08:55:56ZFlorian Holzner.sys-Handler trying to use `debconf-get-selections` on CentOS 7Hi,
I'm on CentOS 7, and I've got a job running that does daily backups of the system configuration using the .sys-Handler. Unfortunately, I get the following warning each time:
> Warning: can't find debconf-get-selections, skipping pa...Hi,
I'm on CentOS 7, and I've got a job running that does daily backups of the system configuration using the .sys-Handler. Unfortunately, I get the following warning each time:
> Warning: can't find debconf-get-selections, skipping package selection states. You might want to install the debconf-utils package.
I'm running `CentOS Linux release 7.3.1611 (Core)` and `backupninja 1.0.1-8.el7` from EPEL.
The concerned lines are lines 238-240 in [sys.in](handlers/sys.in), if I'm not mistaken. It seems that the code handling vservers assumes that those vservers are running Debian. And it looks like setting `vservers = no` in the central config doesn't prevent it from going through the vservers loop, because this is the only place where this warning can be thrown.
Do you have any contribution guidelines that I could look at before I go and try to contribute a patch for this? :)
Here's my config …
```
$ sudo cat /etc/backup.d/10-sysinfo.sys
when = daily
packages = yes
partitions = no
dosfdisk = no
hardware = no
luksheaders = no
lvm = yes
packagesfile = /var/backups/packages.txt
# selectionsfile = /var/backups/debconfsel.txt
# partitionsfile = /var/backups/partitions.__star__.txt
# hardwarefile = /var/backups/hardware.txt
# luksheadersfile = /var/backups/luksheader.__star__.bin
# If vservers = yes in /etc/backupninja.conf then the following variables can
# be used:
# vsnames = all | <vserver1> <vserver2> ... (default = all)
```
… my `/etc/backupninja.conf` …
```
loglevel = 3
reportemail = foo@bar.baz
reportsuccess = yes
reportinfo = yes
reportwarning = yes
reportspace = yes
reportdirectory = /var/lib/backupninja/reports
admingroup = root
logfile = /var/log/backupninja.log
configdirectory = /etc/backup.d
scriptdirectory = /usr/share/backupninja
libdirectory = /usr/libexec/backupninja
usecolors = yes
when = everyday at 03:42
vservers = no
```
… as well as the output when I do a test run of the action using `ninjahelper`.
```
Debug: check_perms /etc/backup.d
Debug: perms: drwxr-x---
Debug: gperm: r-x
Debug: wperm: ---
Debug: check_perms /etc/backup.d/10-sysinfo.sys
Debug: perms: -rw-------
Debug: gperm: ---
Debug: wperm: ---
Info: >>>> starting action /etc/backup.d/10-sysinfo.sys (because of --now)
Debug: yes
Debug: executing handler in locked section controlled by /var/lock/backupninja/_etc_backup.d_10-sysinfo.sys
Debug: Redhat detected
which: no hwinfo in (/sbin:/bin:/usr/sbin:/usr/bin)
Debug: /bin/rpm -qa > /var/backups/packages.txt
Warning: can't find debconf-get-selections, skipping package selection states. You might want to install the debconf-utils package.
/usr/share/backupninja/sys: line 225: [: too many arguments
/usr/share/backupninja/sys: line 230: [: too many arguments
Getting information about the kernel.
Getting disk and filesystem information.
Debug: Let's try to gather the list of LVM volume groups
Debug: /sbin/vgs --options vg_name --noheadings | /usr/bin/sed 's/^[ ]*//' | /usr/bin/sed 's/[ ]*$//' | tr '
' ' '
File descriptor 200 (/run/lock/backupninja/_etc_backup.d_10-sysinfo.sys) leaked on vgs invocation. Parent PID 26275: /usr/bin/bash
Debug: Let's try to backup LVM metadata for detected volume groups: cl
Debug: /sbin/vgcfgbackup --file "/var/backups/lvm"/'%s' cl
File descriptor 200 (/run/lock/backupninja/_etc_backup.d_10-sysinfo.sys) leaked on vgcfgbackup invocation. Parent PID 26294: /usr/bin/bash
Debug: Volume group "cl" successfully backed up.
Info: LVM metadata was saved to /var/backups/lvm for volume groups: cl
Warning: <<<< finished action /etc/backup.d/10-sysinfo.sys: WARNING
Debug: send report to technik@igw.tuwien.ac.at
Info: FINISHED: 1 actions run. 0 fatal. 0 error. 1 warning.
```JulienJulienhttps://0xacab.org/liberate/backupninja/-/issues/4379ignores ssh option2021-01-12T08:16:14Zintrigeriignores ssh optionThe example rsync configuration file advertises a @ssh@ option, that apparently is not used.
*(from redmine: created on 2013-05-25)*The example rsync configuration file advertises a @ssh@ option, that apparently is not used.
*(from redmine: created on 2013-05-25)*Jerome CharaouiJerome Charaouihttps://0xacab.org/liberate/backupninja/-/issues/8279Exit status should be other than zero if backupninja something goes wrong2021-01-12T03:28:07ZGhost UserExit status should be other than zero if backupninja something goes wrongCurrently the backupninja execution exits with the zero exit code on all situations, even When fatals, errors or warnings happen.
The exit code should be other than zero if something goes wrong.
Advantages:
* Fits Bash manual: http://w...Currently the backupninja execution exits with the zero exit code on all situations, even When fatals, errors or warnings happen.
The exit code should be other than zero if something goes wrong.
Advantages:
* Fits Bash manual: http://www.gnu.org/software/bash/manual/html_node/Exit-Status.html
* Exit code might be used by other script running backupninja (by catching the exit code "$?")
This is currently my case: I am exeuting the /usr/sbin/backupninja from another script and backupninja always returns "0" even if something fails. This becomes difficult handling problems.
Here a three simple lines to add at the end of /usr/sbin/backupninja that solves the problem.
<pre>
[ $errors == 0 ] || exit 1
[ $warnings == 0 ] || exit 1
[ $fatals == 0 ] || exit 2
</pre>
*(from redmine: created on 2014-11-20)*https://0xacab.org/liberate/backupninja/-/issues/11311borg should report a warning if borg exits with exit code 12021-01-10T21:26:38ZJamie McClellandborg should report a warning if borg exits with exit code 1Right now, backupninja reports a fatal error if borg exits with 1 (or anything other then 0).
However [an exit code of 1](https://borgbackup.readthedocs.io/en/stable/usage/general.html) should be considered a warning, not an error.
Thi...Right now, backupninja reports a fatal error if borg exits with 1 (or anything other then 0).
However [an exit code of 1](https://borgbackup.readthedocs.io/en/stable/usage/general.html) should be considered a warning, not an error.
This is a useful change because now backupninja reports a fatal error if borg simply failed to backup a file that was removed during the backup.
Thanks!1.2.0-rc1Guillaume SubironGuillaume Subironhttps://0xacab.org/liberate/backupninja/-/issues/11304[borg handler] quotes missing in $create_options test2021-01-07T03:36:00ZJerome Charaoui[borg handler] quotes missing in $create_options testLine 127, needs quoting around `$create_options`, otherwise multiple space-separated options cause the handler to fail.Line 127, needs quoting around `$create_options`, otherwise multiple space-separated options cause the handler to fail.1.2.0-rc1Emil BreinerEmil Breinerhttps://0xacab.org/liberate/backupninja/-/issues/11316Luks2 headers not recognized by sys handler, emits warning2020-12-31T16:12:39ZJerome CharaouiLuks2 headers not recognized by sys handler, emits warningSince the luksDump format is quite different between LUKS version 1 and 2, backupninja fails to recognize the newer format and emits a warning in the logs even though the output is valid.
```
Dec 27 15:50:37 Debug: /usr/sbin/cryptset...Since the luksDump format is quite different between LUKS version 1 and 2, backupninja fails to recognize the newer format and emits a warning in the logs even though the output is valid.
```
Dec 27 15:50:37 Debug: /usr/sbin/cryptsetup luksDump "/dev/ram1" | grep '^Payload offset:' | /usr/bin/awk '{print }'
Dec 27 15:50:37 Warning: The computed size of LUKS header is not an integer, skipping /dev/ram1
```
The luksDump output for LUKS version 2 looks like this:
```
$ sudo /usr/sbin/cryptsetup luksDump "/dev/ram1"
LUKS header information
Version: 2
Epoch: 3
Metadata area: 16384 [bytes]
Keyslots area: 16744448 [bytes]
UUID: 50137cd5-508d-4b5f-bc59-5a9c2f548e86
Label: (no label)
Subsystem: (no subsystem)
Flags: (no flags)
Data segments:
0: crypt
offset: 16777216 [bytes]
length: (whole device)
cipher: aes-xts-plain64
sector: 512 [bytes]
Keyslots:
0: luks2
Key: 512 bits
Priority: normal
Cipher: aes-xts-plain64
Cipher key: 512 bits
PBKDF: argon2i
Time cost: 17
Memory: 247388
Threads: 2
Salt: 67 25 66 a0 ec 06 9d 90 b7 15 96 dc 1d 86 22 4d
35 db 93 10 c7 f8 50 63 1e 11 f9 28 2b 26 d0 a1
AF stripes: 4000
AF hash: sha256
Area offset:32768 [bytes]
Area length:258048 [bytes]
Digest ID: 0
Tokens:
Digests:
0: pbkdf2
Hash: sha256
Iterations: 130031
Salt: 4f 87 9b ef cb 47 75 fb 60 8a 6b cf f9 64 34 e4
f5 56 6f d1 27 4e 4f 19 90 0a 29 e6 43 df 27 4b
Digest: 27 be 0a 7c 9b 04 ba 31 16 42 f8 a8 f5 a6 85 e8
3b 27 9f 18 d2 f5 42 c5 fa 36 c3 b0 92 af 20 ba
```
For comparison, this is the version 1 output:
```
$ sudo /usr/sbin/cryptsetup luksDump "/dev/ram1"
LUKS header information for /dev/ram1
Version: 1
Cipher name: aes
Cipher mode: xts-plain64
Hash spec: sha256
Payload offset: 4096
MK bits: 512
MK digest: 32 6e ea c7 70 b0 42 d8 e8 ed 84 f4 c1 c5 7d 02 4b 50 61 43
MK salt: 19 69 0d 51 70 63 60 45 c0 30 ce 0d d6 af 1e e9
b2 5d 1d 6e 16 87 00 af 01 f5 50 8f 9e 45 1f bd
MK iterations: 128501
UUID: 6410c635-6ebe-44ae-b9d2-27207be763d8
Key Slot 0: ENABLED
Iterations: 2044006
Salt: 5f d7 5a be ab ba f7 c4 4b 56 ac f3 6f db e9 66
7b 10 96 02 04 92 a7 d7 0e 0c 3b 82 d9 55 64 09
Key material offset: 8
AF stripes: 4000
Key Slot 1: DISABLED
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED
```1.2.0-rc1https://0xacab.org/liberate/backupninja/-/issues/11293Don't try to backup partition table when the disc doesn't have one2020-12-30T17:57:31Zsebas891Don't try to backup partition table when the disc doesn't have oneI'm running backupninja of the stretch backport on a server with 4 discs in raid1. 2 discs have partition tables and the other 2 don't have partitions tables (/dev/sdc & /dev/sdd) these 2 last disc are in a array like this `md4 : active ...I'm running backupninja of the stretch backport on a server with 4 discs in raid1. 2 discs have partition tables and the other 2 don't have partitions tables (/dev/sdc & /dev/sdd) these 2 last disc are in a array like this `md4 : active raid1 sdd[1] sdc[0]`
I get this error message when the job /etc/backup.d/30_main.sys runs.
```
Warning: The partition table for /dev/sdc could not be saved.
Warning: The partition table for /dev/sdd could not be saved.
```
Before trying to save the partition table, I think it should check if it exist and only if so, try to save it.
Since, I'm no coder, I can't offer much on the code.
I suspect it's around here.
https://0xacab.org/riseuplabs/backupninja/blob/master/handlers/sys.in#L612
I see that the code around luksheaders is a bit more clever.
https://0xacab.org/riseuplabs/backupninja/blob/master/handlers/sys.in#L635
Cheers,
Sébashttps://0xacab.org/liberate/backupninja/-/issues/11272ninjahelper bug2020-09-01T16:20:15ZChimitninjahelper bugHi!
I just started using **backupninja** and faced with a problem in **ninjahelper**. I chose `sqldump` and `compress` options in the wizard, but when I finished creating the task and opened its config file I saw both options are set to...Hi!
I just started using **backupninja** and faced with a problem in **ninjahelper**. I chose `sqldump` and `compress` options in the wizard, but when I finished creating the task and opened its config file I saw both options are set to **no**:
```
| ### backupninja MySQL config file ### │
│ │
│ # hotcopy = < yes | no > (default = no) │
│ # make a backup of the actual database binary files using mysqlhotcopy. │
│ hotcopy = no │
│ │
│ # sqldump = < yes | no > (default = no) │
│ # make a backup using mysqldump. this creates text files with sql commands │
│ # sufficient to recontruct the database. │
│ # │
│ sqldump = no │
│ │
│ # sqldumpoptions = <options> │
│ # (default = --lock-tables --complete-insert --add-drop-table --quick --quote-names) │
│ # arguments to pass to mysqldump │
│ # sqldumpoptions = --add-drop-table --quick --quote-names │
│ │
│ # compress = < yes | no > (default = yes) │
│ # if yes, compress the sqldump output. │
│ compress = no
```
![Снимок_экрана_2017-05-11_в_14.22.53](/uploads/d129207ea62f596da1b7e2c1541c2b0a/Снимок_экрана_2017-05-11_в_14.22.53.png)1.2.0-rc1Jerome CharaouiJerome Charaouihttps://0xacab.org/liberate/backupninja/-/issues/10579rdiff, makes remote "user" optional2020-08-14T13:27:34ZGhost Userrdiff, makes remote "user" optionalSince .ssh/config could be used, user may be set there (as for hostname, identityFile, ...)
This parameter could thus be made optional.
*(from redmine: created on 2015-11-19)*Since .ssh/config could be used, user may be set there (as for hostname, identityFile, ...)
This parameter could thus be made optional.
*(from redmine: created on 2015-11-19)*https://0xacab.org/liberate/backupninja/-/issues/10488maildir on !bash is fubar2020-08-14T13:27:30ZGuillaumemaildir on !bash is fubarYeah, I was checking custom backups I made for a client and it kept writing over the daily.1 directory. I traced down the code to realize that there is some weird bashism that was crashing on dash (prolly since that time where bash got 0...Yeah, I was checking custom backups I made for a client and it kept writing over the daily.1 directory. I traced down the code to realize that there is some weird bashism that was crashing on dash (prolly since that time where bash got 0wned), that made backup just "write over the old one".
You can fix via:
https://paste.debian.net/324057/
I hacked the patch by hand on concerned servers, but it is nice to check that we aren't all not having as much backups as we thought we would.
*(from redmine: created on 2015-11-05)*https://0xacab.org/liberate/backupninja/-/issues/10363backupninja starts *~ files in /etc/backup.d2020-08-14T13:27:21ZGhost Userbackupninja starts *~ files in /etc/backup.dAs backupninja states to use system v configuration files, it shouldn't start editor backup files named *~
*(from redmine: created on 2015-10-13)*As backupninja states to use system v configuration files, it shouldn't start editor backup files named *~
*(from redmine: created on 2015-10-13)*https://0xacab.org/liberate/backupninja/-/issues/8834new duplicity loses option --ssh-backend causing backups to fail2020-08-14T13:27:09Zmicahnew duplicity loses option --ssh-backend causing backups to failI noticed that duplicity backups started to fail because of:
<pre>
Warning: Duplicity cleanup failed.
Warning: Duplicity remove-older-than failed.
Error: Usage:
Error: duplicity [full|incremental] [options] source_dir target_url
Error: ...I noticed that duplicity backups started to fail because of:
<pre>
Warning: Duplicity cleanup failed.
Warning: Duplicity remove-older-than failed.
Error: Usage:
Error: duplicity [full|incremental] [options] source_dir target_url
Error: duplicity [restore] [options] source_url target_dir
Error: duplicity verify [options] source_url target_dir
Error: duplicity collection-status [options] target_url
Error: duplicity list-current-files [options] target_url
Error: duplicity cleanup [options] target_url
Error: duplicity remove-older-than time [options] target_url
Error: duplicity remove-all-but-n-full count [options] target_url
Error: duplicity remove-all-inc-of-but-n-full count [options] target_url
Error: Backends and their URL formats:
Error: cf+http://container_name
Error: file:///some_dir
Error: ftp://user[:password]@other.host[:port]/some_dir
Error: ftps://user[:password]@other.host[:port]/some_dir
Error: hsi://user[:password]@other.host[:port]/some_dir
Error: imap://user[:password]@other.host[:port]/some_dir
Error: rsync://user[:password]@other.host[:port]::/module/some_dir
Error: rsync://user[:password]@other.host[:port]/relative_path
Error: rsync://user[:password]@other.host[:port]//absolute_path
Error: s3://other.host/bucket_name[/prefix]
Error: s3+http://bucket_name[/prefix]
Error: scp://user[:password]@other.host[:port]/some_dir
Error: ssh://user[:password]@other.host[:port]/some_dir
Error: swift://container_name
Error: tahoe://alias/directory
Error: webdav://user[:password]@other.host/some_dir
Error: webdavs://user[:password]@other.host/some_dir
Error: gdocs://user[:password]@other.host/some_dir
Error: mega://user[:password]@other.host/some_dir
Error: copy://user[:password]@other.host/some_dir
Error: dpbx:///some_dir
Error: onedrive://some_dir
Error: azure://container_name
Error: Commands:
Error: cleanup <target_url>
Error: collection-status <target_url>
Error: full <source_dir> <target_url>
Error: incr <source_dir> <target_url>
Error: list-current-files <target_url>
Error: restore <target_url> <source_dir>
Error: remove-older-than <time> <target_url>
Error: remove-all-but-n-full <count> <target_url>
Error: remove-all-inc-of-but-n-full <count> <target_url>
Error: verify <target_url> <source_dir>
Error: duplicity: error: no such option: --ssh-backend
Fatal: Duplicity failed.
</pre>
This is with duplicity 0.7.01-1
*(from redmine: created on 2015-02-03)*https://0xacab.org/liberate/backupninja/-/issues/8520mysql handler with nodata parameter and no compression fails2020-08-14T13:27:05ZGhost Usermysql handler with nodata parameter and no compression fails<pre>
Warning: bash: -c: line 0: syntax error near unexpected token `-r' bash: -c: line 0: `set -o pipefail ; ( /usr/bin/mysqldump --defaults-extra-file=/etc/mysql/debian.cnf --lock-tables --complete-insert --add-drop-table --quick --quo...<pre>
Warning: bash: -c: line 0: syntax error near unexpected token `-r' bash: -c: line 0: `set -o pipefail ; ( /usr/bin/mysqldump --defaults-extra-file=/etc/mysql/debian.cnf --lock-tables --complete-insert --add-drop-table --quick --quote-names --ignore-table=local.cache local; /usr/bin/mysqldump --defaults-extra-file=/etc/mysql/debian.cnf --lock-tables --complete-insert --add-drop-table --quick --quote-names --no-data local cache ) -r '/backup/hourly/sqldump/local.sql''
Warning: Failed to dump mysql databases local
</pre>
It fails obviously, as in the code we can see:
DUMP="( $DUMP; $DUMP_STRUCT )"
execstr="$DUMP -r '$dumpdir/${db}.sql'"
and it absolutely does not have any sense. Unfortunately I do not know how to fix it, as "-r" overwrites the content and cannot be used two times in the row.
ubuntu 14.04, backupninja 1.0.1-2
*(from redmine: created on 2015-01-03)*https://0xacab.org/liberate/backupninja/-/issues/11267rdiff with keep of 1 deletes all data then syncs all data2020-08-14T13:26:51ZGhost Userrdiff with keep of 1 deletes all data then syncs all dataWe had a problem with one of our systems and generating masses of data changes each day, so we changed our retention (keep) from 12 to 1, thinking backupninja will just sync the changes. What seems to happen is the retention cleanup runs...We had a problem with one of our systems and generating masses of data changes each day, so we changed our retention (keep) from 12 to 1, thinking backupninja will just sync the changes. What seems to happen is the retention cleanup runs first, removing all data, then runs the rdiff-backup and syncs all the data again. This is obviously taking much more time and IO.https://0xacab.org/liberate/backupninja/-/issues/11268rdiff test_connection fails for no reason2020-08-14T13:26:48ZKarlo Dautovićrdiff test_connection fails for no reasonOur rdiff backups often randomly fail because of connection tests, but our connection works all the time. If we disable connection tests with `testconnect = no` the backups succeed every time. I've checked the test_connection function an...Our rdiff backups often randomly fail because of connection tests, but our connection works all the time. If we disable connection tests with `testconnect = no` the backups succeed every time. I've checked the test_connection function and it looks simple enough. There is no relevant output in any logs, even at the highest debug level, and with the addition of ssh -vvv. Perhaps a more robust test might be better.