[SOLVED] Do I need to disable cron jobs from running before doing a restore?

I’m practicing updating nextcloud server before laying my hands on the real server with data on it. When I read the Admin Manual, I was told to backup first, so I hopped to the Backup and Restore part and learned how to backup and restore
I also want to practice restoring data, so I read the instructions of data restoring. While I have read that I need to disable the cron job before upgrading manually, I didn’t see such instructions in the Restoring backup section. Since I am, in fact, restoring backups on a existing nextcloud instance, is it also necessary to disable cron jobs? Or, since I already put the ncserver into maintenance mode in config.php before dong restoration, does that stops the cron jobs from being executed?

Just had some experiment with my VM, put my server into maintenance mode and enabled the cron job to see what happened after a few hours. Then I disabled the cron job and leave maintenance mode to see if the background task has been executed.

It didn’t, the settings page shows the background task was executed 1 hour ago.

Hmmmmm :thinking:

Hi Moresoka,
reading your questions I feel that you are some kind of a home-user?
If so, you might want to take a look at https://nextcloudpi.com/

NextcloudPi is a Nextcloud instance that is preinstalled, preconfigured and includes a management interface with all the tools you need to self host your private data in a single package.

Inside this NCP-management interface there are also scripts for for backup, update, restore that take care about your above detailed questions.

FYI: There is also a similar packacke called Nextcloud AIO - however I don’t know much details on this.

Hope that helps
schoetju

The local ISP throttled access to nextcloud software download and blocked github, so I cannot use most software’s self update feature.

To give a clear answer to your question: Yes!

You can find out this way:

set loglevel to “0”
enable maintenance mode
run the cronjob by hand
logecho (sifted out):

  "app": "cron",
  "message": "We are in maintenance mode, skipping cron",

Happy hacking

1 Like