Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Offical apps | Community apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Feature Requests
  3. Full backup: carry on past a failing app, then keep the backup marked as partial

Full backup: carry on past a failing app, then keep the backup marked as partial

Scheduled Pinned Locked Moved Feature Requests
backups
2 Posts 2 Posters 84 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L
    L
    LoudLemur
    wrote last edited by
    #1

    Following on from @james's suggestion in https://forum.cloudron.io/post/129999 .

    What happens today

    In fullBackup() (src/backuptask.js, the same in 10.0.4, 10.0.5 and master), each app is backed up in turn inside a loop, and the first failure ends the whole run:

    const [appBackupError, appBackupResult] = await safe(backupAppWithTag(app, ...));
    ...
    if (appBackupError) throw appBackupError;
    

    Mail and the system data are only backed up after the loop, so when one app fails, every app after it in the list, plus mail and the system data, gets no backup from that run. If the failure persists (an app whose backupCommand keeps failing, for example), the same thing happens every night.

    Why it matters

    For a whole-server restore, one app with a flagged, incomplete backup is much better than a server where half the apps, the mail and the system data have no fresh backup, all because of an app that may sit early in the list.

    It also leaves app packagers with two bad choices when a backupCommand cannot produce a complete backup. Exiting non-zero is honest, but it costs every other app on the server its backup. Exiting zero protects the others, but hides the failure from the platform, so packages end up inventing their own notices (our Meilisearch package writes a BACKUP-FAILED.txt and repeats it in the log at every start). We would much rather fail honestly.

    What we are asking for

    1. When an app's backup fails, record the failure and carry on with the remaining apps, then mail and the system data.
    2. Keep the resulting backup, but mark it as partial, and name the app or apps that failed and why.
    3. Report the run as failed, with a notification naming those apps, so nothing passes as fine.
    4. For the failed apps, either leave them out of the partial backup or point to their last good backup, but say which, so that a restore from a partial backup warns before it restores an app from something older or incomplete.
    5. Do not let partial backups count towards retention in a way that prunes the last complete backup. Otherwise a week of partial runs could rotate out the only full one.

    With that in place, packages can exit non-zero whenever their backupCommand genuinely fails, and the platform stays the one place where backup health is reported.

    We are happy to test a build against a package with a deliberately failing backupCommand.

    1 Reply Last reply
    4
    • L LoudLemur referenced this topic
    • girishG
      girishG
      girish
      Staff
      wrote last edited by
      #2

      Interesting report. Another quirk of community packages. I wrote the whole backup logic with the assumption that backup fail was something we should fix. If the did fail, either it was some platform error or some external backup service error 😄

      1 Reply Last reply
      2

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Bookmarks
      • Search