BernieO / calcardbackup

calcardbackup: moved to https://codeberg.org/BernieO/calcardbackup
GNU Affero General Public License v3.0
69 stars 5 forks source link

Error when using -r #21

Closed theincredibleschnigges closed 5 years ago

theincredibleschnigges commented 5 years ago

Script Version: 0.8.10 Nextcloud Version: 16.0

Usage: sudo -u www ./calcardbackup /usr/local/www/apache24/data/nextcloud/ -o /mnt/backup/ -r 30

When passing "-o 30" as parameter (currently there are no backups older than 30 days, not sure if this is relevant), I get the following error:

find: -daystart: unknown primary or operator -- calcardbackup: ERROR -- -- ERROR: deleting backups older than 30 days produced above error. -- calcardbackup: Exiting.

BernieO commented 5 years ago

I can't reproduce the issue, which makes bughunting a bit complicated - but I kind of have an idea what the problem might be. I'll have a closer look the next couple of days.

For my information: Which operating system are you using on the machine where calcardbackup is running? Which find version is installed (check with find --version)?

EDIT: just noticed, that the title is a bit misleading. This is about option -r and not about option -o I changed the title of this issue

BernieO commented 5 years ago

0350d7245d735c600a630d7e3bf2d5cb4f30a049 should fix this The fix is currently only in the testing branch until the next release.

I am also going to rewrite the function which gets executed when run with option -ltm where the same problem exists

BernieO commented 5 years ago

@theincredibleschnigges could you please check whether the version from 8d973cae solves your issue?

theincredibleschnigges commented 5 years ago

With the new version on the testing branch, I get the following error:

I am working in a FreeBSD 11.2 jail (find --version is not supported).

BernieO commented 5 years ago

I need some more time, because I need to dig a bit deeper in options to FreeBSD commands.

BernieO commented 5 years ago

~~276ee15d80cc14f08fea6304075380aa123e3302 should fix the issue for you (at least it does in my FreeBSD-VM) Could you please test and verify?~~ EDIT: I did another minor modification, which should not make any difference. Could you please confirm, that your issue is solved with: a3f0188a70c68a8897ce43ec1ffa487e58da31a4 - thanks.

BernieO commented 5 years ago

@theincredibleschnigges have you checked yet whether your issue still exists in the testing branch?

theincredibleschnigges commented 5 years ago

Seems to work like a charm, thanks!

+  Backup successfully compressed!
+  Find your backup here: /mnt/backup/calcardbackup-2019-05-27.tar.gz
+  deleting backups older than 30 days:
+     --> no backups older than 30 days found to delete.
+  Mon May 27 22:13:47 CEST 2019 --> END calcardbackup
BernieO commented 5 years ago

This issue is solved with release v0.9.0 (2c7e9ba)