Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Elementary] BiT completes a new snapshot every 15 minutes when using anacron #1228

Closed
ayoungethan opened this issue Feb 25, 2022 · 9 comments
Labels
Bug Close after cooling-off period Distro-Specific only for certain distributions, desktop environments or display servers Heisenbug a problem that is not reproducible but random (non-deterministic) Scheduling cron, anacron etc.

Comments

@ayoungethan
Copy link

$ uname -a
Linux NanoQubeeOS 5.13.0-30-lowlatency #33~20.04.1-Ubuntu SMP PREEMPT Mon Feb 7 15:23:11 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

OS: Elementary 6.1 Jolnir (based on Ubuntu LTS 20.04)

Under "schedule" I have selected "repeatedly" (anacron) and specified every 2 hours. However, since doing this, my snapshots are accumulating at a rate of every 15 minutes. Eg, 11:45, 12:00, 12:15, 12:30, etc etc.

$ crontab -l
#Back In Time system entry, this will be edited by the gui:
*/15 * * * * /usr/bin/nice -n19 /usr/bin/ionice -c2 -n7 /usr/bin/backintime backup-job >/dev/null

@emtiu
Copy link
Member

emtiu commented Sep 14, 2022

I'm trying to reproduce this problem, could you please tell me: How did you install backintime in Elementary? It doesn't seem to be available in Elementary's "app-store". Did you add the Ubuntu PPA manually?

@emtiu emtiu added Scheduling cron, anacron etc. Distro-Specific only for certain distributions, desktop environments or display servers Bug labels Sep 14, 2022
@emtiu emtiu changed the title BiT completes a new snapshot every 15 minutes when using anacron [Elementary] BiT completes a new snapshot every 15 minutes when using anacron Sep 14, 2022
@ayoungethan
Copy link
Author

I believe that I had added and installed from the PPA, yes, but it was several months ago and I don't have my installation notes. I would have followed the installation instructions available here: https://github.com/bit-team/backintime/#installation

@ayoungethan
Copy link
Author

I'm also having general troubles with certain background administrative tasks and processes with a second (standard, non-administrative) user account activated. I don't know if this is another one of those problems (e.g., which account checks for updates, fighting over bluetooth control, inability to suspend the computer, etc) or a condition for reproducing the problem.

@emtiu
Copy link
Member

emtiu commented Sep 14, 2022

Thanks, I've managed to install backintime from the PPA, and will be able to test things. (Not soon, but eventually :))

@emtiu
Copy link
Member

emtiu commented Sep 14, 2022

Okay, here's what's supposed to happen with the schedule set to "Repeatedly (anacron)" mode:

  1. backintime backup-job is called every 15 minutes (this is what you see in your crontab)
  2. backintime checks a file in $HOME/.local/share/backintime/anacron/. The file it checks is named like 1_Main_profile, or accordingly for other backintime profiles (e.g. 3_remote).
  3. The file contains the date and time that a snapshot was last taken. If the interval you have specified in the settings (e.g. "Every 1 day") has not yet passed, then no snapshot will be taken.

I have tested this in a VM running Elementary, and it seems to be working as intended.

My best guess is that in your case, the file(s) in $HOME/.local/share/backintime/anacron/ are somehow not readable, not writable, have invalid names, or simply don't exist.

We'll probably learn more if you take a look at that folder, the files inside and their contents. Do they change when you run backintime backup-job? Is the date+time saved inside correct? Thanks for checking :)

@ayoungethan
Copy link
Author

ayoungethan commented Sep 19, 2022 via email

@emtiu
Copy link
Member

emtiu commented Sep 19, 2022

I had long since removed backintime and returned to Duplicity + Deja-Dup since it has an integrated filesystem navigator now. I'll need to reinstall backintime to check these things. I think I can do that this week.

That's great, thanks :)

The thing that confuses me is that even if those files were missing, misnamed, or not readable or writable, the program itself should check for that and NOT blindly run backups over and over again. Could this be a sandboxing issue?

That's a good point. From glancing at the code, it looks like there isn't any sort of check:

backintime/common/config.py

Lines 1376 to 1378 in 88d19d4

last_time = tools.readTimeStamp(self.anacronSpoolFile(profile_id))
if not last_time:
return True

Then again, backintime reasonably assumes that the anacron timestamp files exist, because it creates them with every snapshot run (even when run from crontab, or manually). So we're back to wondering why this fails for you :)

@buhtz buhtz added this to the 1.3.5 / 1.4.0 milestone Mar 19, 2023
@buhtz buhtz added Heisenbug a problem that is not reproducible but random (non-deterministic) Close after cooling-off period labels Sep 10, 2024
@buhtz
Copy link
Member

buhtz commented Sep 10, 2024

Looks like that we can close this issue because it is not reproducible and no new information where added.

@buhtz
Copy link
Member

buhtz commented Sep 25, 2024

Closing this ticket based on the comment above. Feel free to reopen
if the problem still exists. Thank you for your efforts. If you have
any further questions, ideas or encounter any other issues, please
don't hesitate to let us know.

Best regards,

@buhtz buhtz closed this as completed Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Close after cooling-off period Distro-Specific only for certain distributions, desktop environments or display servers Heisenbug a problem that is not reproducible but random (non-deterministic) Scheduling cron, anacron etc.
Projects
None yet
Development

No branches or pull requests

3 participants