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

Automatic upgrade process - Disable Backup #145

Closed
Nono-m0le opened this issue Sep 25, 2017 · 28 comments
Closed

Automatic upgrade process - Disable Backup #145

Nono-m0le opened this issue Sep 25, 2017 · 28 comments

Comments

@Nono-m0le
Copy link

Nono-m0le commented Sep 25, 2017

Would that be possible to be able to choose whenever we want to do a backup during a automatic upgrade ?
On my case, I'm taking care of the backup on the server side (cli) and I can't use the automatic upgrade process because the "Create backup" task systematically failed for various reasons:

The first reason is the nginx in front-end and the apache2 on the back-end which is hosting my instance.
Another reason is the utilization of ldap as nextcloud & system authentification (www-data not the same on the front / back-end / NFS Server)
Finally, the server host their file on an NFS server (not locally) which is also had a complexity in term of user rights.

I agree all those points are basically my issue / wrong configuration but the automatic update shouldn't be unuable (at all) because of a "backup step" I don't really need/use.

@MorrisJobke
Copy link
Member

@Nono-m0le Do you have any logs regarding the backup step that can't be done?

@Nono-m0le
Copy link
Author

Nono-m0le commented Sep 25, 2017 via email

@MorrisJobke
Copy link
Member

504 error from the front end.

Could you post your updater.log from the data dir?

@Nono-m0le
Copy link
Author

Here it is. It must shown 1 or 2 tries from the automatic updater and I finish by using the updater.phar :

2017-09-25T11:32:58+0200 q9HCcAUB4H [info] request to updater
2017-09-25T11:32:58+0200 q9HCcAUB4H [info] currentStep()
2017-09-25T11:32:58+0200 q9HCcAUB4H [info] show HTML page
2017-09-25T11:32:58+0200 q9HCcAUB4H [info] current version: 11.0.4 build time: 2017-08-06T18:51:24+00:00 9779e5eaceaf116c3b91af836923db352cfc0c0f
2017-09-25T11:32:59+0200 q9HCcAUB4H [info] getUpdateServerResponse()
2017-09-25T11:32:59+0200 q9HCcAUB4H [info] updaterServer: https://updates.nextcloud.org/updater_server/
2017-09-25T11:32:59+0200 q9HCcAUB4H [info] releaseChannel: stable
2017-09-25T11:32:59+0200 q9HCcAUB4H [info] internal version: 11.0.4.1
2017-09-25T11:32:59+0200 q9HCcAUB4H [info] getUpdateServerResponse response: Array
(
[version] => 11.0.5.1
[versionstring] => Nextcloud 11.0.5
[url] => https://download.nextcloud.com/server/releases/nextcloud-11.0.5.zip
[web] => https://docs.nextcloud.com/server/11/admin_manual/maintenance/upgrade.html
[autoupdater] => 1
[signature] => cHDTGRqT5giXS+sgbFsOxvpag1dZRbJdU5OJ1bHp4j1o4/WE5uGM/bEC96G3tbHM
AT/tOw71l6lMX3zDM9QAZxAY2ZnfnQoBGn6DiURFV7DR/xpEVLY4+d/yLMlpi9bE
y3l4SxnM0NDbF0brD168Oi4aKquccpXQmngEPK9JcRcN8OZ9PksKQmI8C78b/2b2
PWXMikNX9t2Ir7pMnCHUoeLAuN/7KVxbkDRKIqVp/7xPEwbFKS2g4YuF7NdA2WA5
HXOX96B1e8foC+zLoFn/BKhOWMFgOsPogn17xscfsNYsIC8kosegEp0qWmi3pFZ0
czpgycaoL8+t+4iHq4CLiA==
)

2017-09-25T11:32:59+0200 q9HCcAUB4H [info] checkForUpdate() Array
(
[version] => 11.0.5.1
[versionstring] => Nextcloud 11.0.5
[url] => https://download.nextcloud.com/server/releases/nextcloud-11.0.5.zip
[web] => https://docs.nextcloud.com/server/11/admin_manual/maintenance/upgrade.html
[autoupdater] => 1
[signature] => cHDTGRqT5giXS+sgbFsOxvpag1dZRbJdU5OJ1bHp4j1o4/WE5uGM/bEC96G3tbHM
AT/tOw71l6lMX3zDM9QAZxAY2ZnfnQoBGn6DiURFV7DR/xpEVLY4+d/yLMlpi9bE
y3l4SxnM0NDbF0brD168Oi4aKquccpXQmngEPK9JcRcN8OZ9PksKQmI8C78b/2b2
PWXMikNX9t2Ir7pMnCHUoeLAuN/7KVxbkDRKIqVp/7xPEwbFKS2g4YuF7NdA2WA5
HXOX96B1e8foC+zLoFn/BKhOWMFgOsPogn17xscfsNYsIC8kosegEp0qWmi3pFZ0
czpgycaoL8+t+4iHq4CLiA==
)

2017-09-25T11:32:59+0200 q9HCcAUB4H [info] end of checkForUpdate() Update to Nextcloud 11.0.5 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-11.0.5.zip
2017-09-25T11:33:01+0200 V6BbTVlzKk [info] request to updater
2017-09-25T11:33:01+0200 V6BbTVlzKk [info] currentStep()
2017-09-25T11:33:01+0200 V6BbTVlzKk [info] POST request for step "1"
2017-09-25T11:33:02+0200 V6BbTVlzKk [info] startStep("1")
2017-09-25T11:33:02+0200 V6BbTVlzKk [info] checkForExpectedFilesAndFolders()
2017-09-25T11:33:02+0200 V6BbTVlzKk [info] end of checkForExpectedFilesAndFolders()
2017-09-25T11:33:02+0200 V6BbTVlzKk [info] endStep("1")
2017-09-25T11:33:02+0200 97jxhhdCD0 [info] request to updater
2017-09-25T11:33:02+0200 97jxhhdCD0 [info] currentStep()
2017-09-25T11:33:02+0200 97jxhhdCD0 [info] Step 1 is in state "end".
2017-09-25T11:33:02+0200 97jxhhdCD0 [info] POST request for step "2"
2017-09-25T11:33:02+0200 97jxhhdCD0 [info] startStep("2")
2017-09-25T11:33:02+0200 97jxhhdCD0 [info] checkWritePermissions()
2017-09-25T11:33:02+0200 97jxhhdCD0 [info] end of checkWritePermissions()
2017-09-25T11:33:02+0200 97jxhhdCD0 [info] endStep("2")
2017-09-25T11:33:03+0200 VG9agb236t [info] request to updater
2017-09-25T11:33:03+0200 VG9agb236t [info] currentStep()
2017-09-25T11:33:03+0200 VG9agb236t [info] Step 2 is in state "end".
2017-09-25T11:33:03+0200 VG9agb236t [info] POST request for step "3"
2017-09-25T11:33:03+0200 VG9agb236t [info] startStep("3")
2017-09-25T11:33:03+0200 VG9agb236t [info] setMaintenanceMode("true")
2017-09-25T11:33:03+0200 VG9agb236t [info] configFileName /var/www/cloud/updater/../config/config.php
2017-09-25T11:33:03+0200 VG9agb236t [info] end of setMaintenanceMode()
2017-09-25T11:33:03+0200 VG9agb236t [info] endStep("3")
2017-09-25T11:33:03+0200 jCl9IyGowI [info] request to updater
2017-09-25T11:33:03+0200 jCl9IyGowI [info] currentStep()
2017-09-25T11:33:03+0200 jCl9IyGowI [info] Step 3 is in state "end".
2017-09-25T11:33:03+0200 jCl9IyGowI [info] POST request for step "4"
2017-09-25T11:33:03+0200 jCl9IyGowI [info] startStep("4")
2017-09-25T11:33:03+0200 jCl9IyGowI [info] createBackup()
2017-09-25T11:41:26+0200 jCl9IyGowI [info] end of createBackup()
2017-09-25T11:41:27+0200 jCl9IyGowI [info] endStep("4")
2017-09-25T10:24:59+0000 2nPp6rji2H [info] updater cli is executed
2017-09-25T10:24:59+0000 2nPp6rji2H [info] currentStep()
2017-09-25T10:24:59+0000 2nPp6rji2H [info] Step 4 is in state "end".
2017-09-25T10:24:59+0000 2nPp6rji2H [info] current version: 11.0.4 build time: 2017-08-06T18:51:24+00:00 9779e5eaceaf116c3b91af836923db352cfc0c0f
2017-09-25T10:24:59+0000 2nPp6rji2H [info] getUpdateServerResponse()
2017-09-25T10:24:59+0000 2nPp6rji2H [info] updaterServer: https://updates.nextcloud.org/updater_server/
2017-09-25T10:24:59+0000 2nPp6rji2H [info] releaseChannel: stable
2017-09-25T10:24:59+0000 2nPp6rji2H [info] internal version: 11.0.4.1
2017-09-25T10:24:59+0000 2nPp6rji2H [info] getUpdateServerResponse response: Array
(
[version] => 11.0.5.1
[versionstring] => Nextcloud 11.0.5
[url] => https://download.nextcloud.com/server/releases/nextcloud-11.0.5.zip
[web] => https://docs.nextcloud.com/server/11/admin_manual/maintenance/upgrade.html
[autoupdater] => 1
[signature] => cHDTGRqT5giXS+sgbFsOxvpag1dZRbJdU5OJ1bHp4j1o4/WE5uGM/bEC96G3tbHM
AT/tOw71l6lMX3zDM9QAZxAY2ZnfnQoBGn6DiURFV7DR/xpEVLY4+d/yLMlpi9bE
y3l4SxnM0NDbF0brD168Oi4aKquccpXQmngEPK9JcRcN8OZ9PksKQmI8C78b/2b2
PWXMikNX9t2Ir7pMnCHUoeLAuN/7KVxbkDRKIqVp/7xPEwbFKS2g4YuF7NdA2WA5
HXOX96B1e8foC+zLoFn/BKhOWMFgOsPogn17xscfsNYsIC8kosegEp0qWmi3pFZ0
czpgycaoL8+t+4iHq4CLiA==
)

2017-09-25T10:24:59+0000 2nPp6rji2H [info] checkForUpdate() Array
(
[version] => 11.0.5.1
[versionstring] => Nextcloud 11.0.5
[url] => https://download.nextcloud.com/server/releases/nextcloud-11.0.5.zip
[web] => https://docs.nextcloud.com/server/11/admin_manual/maintenance/upgrade.html
[autoupdater] => 1
[signature] => cHDTGRqT5giXS+sgbFsOxvpag1dZRbJdU5OJ1bHp4j1o4/WE5uGM/bEC96G3tbHM
AT/tOw71l6lMX3zDM9QAZxAY2ZnfnQoBGn6DiURFV7DR/xpEVLY4+d/yLMlpi9bE
y3l4SxnM0NDbF0brD168Oi4aKquccpXQmngEPK9JcRcN8OZ9PksKQmI8C78b/2b2
PWXMikNX9t2Ir7pMnCHUoeLAuN/7KVxbkDRKIqVp/7xPEwbFKS2g4YuF7NdA2WA5
HXOX96B1e8foC+zLoFn/BKhOWMFgOsPogn17xscfsNYsIC8kosegEp0qWmi3pFZ0
czpgycaoL8+t+4iHq4CLiA==
)

2017-09-25T10:24:59+0000 2nPp6rji2H [info] end of checkForUpdate() Update to Nextcloud 11.0.5 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-11.0.5.zip
2017-09-25T10:25:05+0000 2nPp6rji2H [info] updater started
2017-09-25T10:25:05+0000 2nPp6rji2H [info] executeStep request for step "5"
2017-09-25T10:25:05+0000 2nPp6rji2H [info] startStep("5")
2017-09-25T10:25:05+0000 2nPp6rji2H [info] downloadUpdate()
2017-09-25T10:25:05+0000 2nPp6rji2H [info] getUpdateServerResponse()
2017-09-25T10:25:05+0000 2nPp6rji2H [info] updaterServer: https://updates.nextcloud.org/updater_server/
2017-09-25T10:25:05+0000 2nPp6rji2H [info] releaseChannel: stable
2017-09-25T10:25:05+0000 2nPp6rji2H [info] internal version: 11.0.4.1
2017-09-25T10:25:05+0000 2nPp6rji2H [info] getUpdateServerResponse response: Array
(
[version] => 11.0.5.1
[versionstring] => Nextcloud 11.0.5
[url] => https://download.nextcloud.com/server/releases/nextcloud-11.0.5.zip
[web] => https://docs.nextcloud.com/server/11/admin_manual/maintenance/upgrade.html
[autoupdater] => 1
[signature] => cHDTGRqT5giXS+sgbFsOxvpag1dZRbJdU5OJ1bHp4j1o4/WE5uGM/bEC96G3tbHM
AT/tOw71l6lMX3zDM9QAZxAY2ZnfnQoBGn6DiURFV7DR/xpEVLY4+d/yLMlpi9bE
y3l4SxnM0NDbF0brD168Oi4aKquccpXQmngEPK9JcRcN8OZ9PksKQmI8C78b/2b2
PWXMikNX9t2Ir7pMnCHUoeLAuN/7KVxbkDRKIqVp/7xPEwbFKS2g4YuF7NdA2WA5
HXOX96B1e8foC+zLoFn/BKhOWMFgOsPogn17xscfsNYsIC8kosegEp0qWmi3pFZ0
czpgycaoL8+t+4iHq4CLiA==
)

2017-09-25T10:25:05+0000 2nPp6rji2H [info] storage location exists
2017-09-25T10:25:11+0000 2nPp6rji2H [info] end of downloadUpdate()
2017-09-25T10:25:11+0000 2nPp6rji2H [info] endStep("5")
2017-09-25T10:25:11+0000 2nPp6rji2H [info] executeStep request for step "6"
2017-09-25T10:25:11+0000 2nPp6rji2H [info] startStep("6")
2017-09-25T10:25:11+0000 2nPp6rji2H [info] extractDownload()
2017-09-25T10:25:11+0000 2nPp6rji2H [info] storage location: /mnt/nfs/home/cloud/data/updater-oc5xbs4qdda8/downloads/
2017-09-25T10:34:50+0000 2nPp6rji2H [info] end of extractDownload()
2017-09-25T10:34:50+0000 2nPp6rji2H [info] endStep("6")
2017-09-25T10:34:50+0000 2nPp6rji2H [info] executeStep request for step "7"
2017-09-25T10:34:50+0000 2nPp6rji2H [info] startStep("7")
2017-09-25T10:34:50+0000 2nPp6rji2H [info] replaceEntryPoints()
2017-09-25T10:34:51+0000 2nPp6rji2H [info] replace index.php
2017-09-25T10:34:51+0000 2nPp6rji2H [info] replace status.php
2017-09-25T10:34:51+0000 2nPp6rji2H [info] replace remote.php
2017-09-25T10:34:51+0000 2nPp6rji2H [info] replace public.php
2017-09-25T10:34:51+0000 2nPp6rji2H [info] replace ocs/v1.php
2017-09-25T10:34:51+0000 2nPp6rji2H [info] replace ocs/v2.php
2017-09-25T10:34:51+0000 2nPp6rji2H [info] end of replaceEntryPoints()
2017-09-25T10:34:51+0000 2nPp6rji2H [info] endStep("7")
2017-09-25T10:34:51+0000 2nPp6rji2H [info] executeStep request for step "8"
2017-09-25T10:34:52+0000 2nPp6rji2H [info] startStep("8")
2017-09-25T10:34:52+0000 2nPp6rji2H [info] deleteOldFiles()
2017-09-25T10:34:52+0000 2nPp6rji2H [info] config sample exists
2017-09-25T10:34:53+0000 2nPp6rji2H [info] thmes README exists
2017-09-25T10:34:53+0000 2nPp6rji2H [info] end of deleteOldFiles()
2017-09-25T10:34:53+0000 2nPp6rji2H [info] endStep("8")
2017-09-25T10:34:54+0000 2nPp6rji2H [info] executeStep request for step "9"
2017-09-25T10:34:54+0000 2nPp6rji2H [info] startStep("9")
2017-09-25T10:34:54+0000 2nPp6rji2H [info] moveNewVersionInPlace()
2017-09-25T10:34:54+0000 2nPp6rji2H [info] storage location: /mnt/nfs/home/cloud/data/updater-oc5xbs4qdda8/downloads/nextcloud/
2017-09-25T10:36:49+0000 2nPp6rji2H [info] end of moveNewVersionInPlace()
2017-09-25T10:36:49+0000 2nPp6rji2H [info] endStep("9")
2017-09-25T10:36:49+0000 2nPp6rji2H [info] executeStep request for step "11"
2017-09-25T10:36:49+0000 2nPp6rji2H [info] startStep("11")
2017-09-25T10:36:49+0000 2nPp6rji2H [info] finalize()
2017-09-25T10:36:49+0000 2nPp6rji2H [info] storage location: /mnt/nfs/home/cloud/data/updater-oc5xbs4qdda8/downloads/nextcloud/
2017-09-25T10:36:49+0000 2nPp6rji2H [info] end of finalize()
2017-09-25T10:36:49+0000 2nPp6rji2H [info] endStep("11")
2017-09-25T10:36:49+0000 2nPp6rji2H [info] update of code successful.
2017-09-25T11:19:40+0000 2nPp6rji2H [info] setMaintenanceMode("false")
2017-09-25T11:19:40+0000 2nPp6rji2H [info] configFileName /var/www/cloud/updater/../config/config.php
2017-09-25T11:19:40+0000 2nPp6rji2H [info] end of setMaintenanceMode()
2017-09-25T11:19:40+0000 2nPp6rji2H [info] maintenance mode is disabled

@MorrisJobke
Copy link
Member

2017-09-25T11:33:03+0200 jCl9IyGowI [info] createBackup()
2017-09-25T11:41:26+0200 jCl9IyGowI [info] end of createBackup()

I would say, that your webserver killed the pending request. Nothing we can do here. If the web server decides do kill it after a given time, it is killed (the request not the PHP process as you can see, that the process finished fine after 8,5 minutes). This can basically happen in all tasks. So disabling that one would not help at all.

Use the CLI based updater and this is not really a problem. Sorry - we can't do much here.

@Nono-m0le
Copy link
Author

How can I disable (manually) this step to check if the upgrade still fail without?!
I disagree with you. We should be able to choose if we want to do the backup or not, especially, we don't really know what the backup do and it can be just another (incomplete) occurrence of an already performed backup (on the server side, again).

@MorrisJobke
Copy link
Member

How can I disable (manually) this step to check if the upgrade still fail without?!
I disagree with you. We should be able to choose if we want to do the backup or not, especially, we don't really know what the backup do and it can be just another (incomplete) occurrence of an already performed backup (on the server side, again).

The backup does a copy of the existing code to be able to rollback if something went wrong later. Another way: maybe have a look why taking a backup of some thousand files with a total amount of 50 MB takes 8,5 minutes. Maybe there is an I/O limit hit.

@Nono-m0le
Copy link
Author

could be, but still won't let me disable this step ...

@MorrisJobke
Copy link
Member

could be, but still won't let me disable this step ...

I really don't like to allow people to randomly disable stuff, that we put in place for a reason. If the web updater doesn't work for you we can not do much and disabling stuff, just because "if we disable it it works" is not a good approach. There is a reason why it doesn't work. And at some day it will fail in the "copy code over" step and then the problem is bigger. So better don't use it then and rely on the updater.phar, which works a lot better and don't has this timeout problem.

@Nono-m0le
Copy link
Author

and I understand your approach (which btw seems to be the good one).
The only point which bring frustration is that I'm supposed to do backups (code + data) in case of major issue so, I've been tasked/asked to perform this safe guard and on the other hand, the application won't let me use the easiest upgrading method because of a backup system ...
If the updater.phar works better and doesn't have this timeout issue, why shouldn't be able to trigger this from the application directly ?

@MorrisJobke
Copy link
Member

If the updater.phar works better and doesn't have this timeout issue, why shouldn't be able to trigger this from the application directly ?

because it then would have the same problem. The CLI and the web is exactly the same code, but for the web we run through the web server, which could kill the process. The CLI is not piped through a webserver and therefore can not be killed by it. If you now propose to run the CLI via the webserver it would eliminate the advantages and make it not better.

@grabnab
Copy link

grabnab commented Mar 17, 2018

So, I don't want to start a new discussion, but I only want to mention, thet I have a huge amount of files in the data section. These files are backed up by other services, so I don't need to backup them twice. I also have to wait for the backup approx three days to finish?? I think thats not practible. Maybe you can put a config param or something like that to disable the backup procedure?

@MorrisJobke
Copy link
Member

So, I don't want to start a new discussion, but I only want to mention, thet I have a huge amount of files in the data section. These files are backed up by other services, so I don't need to backup them twice. I also have to wait for the backup approx three days to finish?? I think thats not practible. Maybe you can put a config param or something like that to disable the backup procedure?

The backup only backs up the code and not the data directory. It could be a bit slower because it copies a lot of small files, which could cause some performance issues depending on the filesystem you are writing them to.

@grabnab
Copy link

grabnab commented Mar 17, 2018

OK, I understand. Thank you.

@MasterPuffin
Copy link

There might be the case where you can't change your PHP settings eg if you use shared hosting. In this case, you can do an update by hand and then disabling the backup function in the updater by going to your nextcloud main directory and then to the updater/index.php and comment out line 1291
$updater->createBackup();

@Nono-m0le
Copy link
Author

There might be the case where you can't change your PHP settings eg if you use shared hosting. In this case, you can do an update by hand and then disabling the backup function in the updater by going to your nextcloud main directory and then to the updater/index.php and comment out line 1291
$updater->createBackup();

I actually tried that during the last upgrade and it didn't work ...
Now, this backup task takes more than 20min on my case :(

@Mickael-Martin
Copy link

Mickael-Martin commented Feb 19, 2019

The update works with the phar file (compressed file). If you want modify it, you must extract the phar file in the updater directory and use update.php.
php -r '$phar = new Phar("updater.phar"); $phar->extractTo(".");'

@vpistis
Copy link

vpistis commented Aug 20, 2019

The update works with the phar file (compressed file). If you want modify it, you must extract the phar file in the updater directory and use update.php.
php -r '$phar = new Phar("updater.phar"); $phar->extractTo(".");'

in NC 15 I commented the code at row 356 into file lib/UpdateCommand.php:

                                case 3:
                                //      $this->updater->createBackup();
                                        break;

and after I use the update.php file instead of update.phar...the backup step is skipped for this run

@daniu-de
Copy link

finally ...

it really drives me nuts that everytime I want to upgrad NC I need to try 1000 times (it is literally usually more than 10) until finally with lots of luck it works. Most remarkable is that this problem is not seen as a problem by the programmers and there are lots of threads each time NC receives an upgrade.
I - as probably lots of others - run NC on a hosted server without access to a shell and with a very good backupsystem that allows me to restore the whole server data within a couple of minutes. I think it would really be a very good idea to allow to skip backup officially without hacking the code ...
I do not care about this being not a good idea as long as there is no other idea to solve the actual problem. After all it is a way that works and there seems to be no other way.

@grabnab
Copy link

grabnab commented Oct 9, 2019

Now I try the update to 16.0.5 ... and wich step doesn't work for me?
Right: The 'Create backup' - step.
The method from @vpistis works for me.
What is wrong with this step?

@daniu-de
Copy link

daniu-de commented Oct 9, 2019

Now I try the update to 16.0.5 ... and wich step doesn't work for me?
Right: The 'Create backup' - step.
The method from @vpistis works for me.
What is wrong with this step?

something is wrong with your server settings. Probably something beyond your control. Some timeout or CPU capacity that you just did not pay enough to get it extended ... and that is the reason why this point is not seen as a problem by NC programmers: if you had total control of your server you would never run into that issue ...
My point is: NC itsself runs perfectly with my setup - the only thing that does not is the update process. IMO it does not make any sense to increase the software requirements only only just because the update process cannot be altered in a way that it works with what is absolutely sufficient for running the software itsself.

@drwwww
Copy link

drwwww commented Oct 21, 2019

For skipping the backup in 16.0.3, what worked for me was was commenting out lines 1332-4 of /updater/index.php which reads when commented out:
// case 3: // $updater->createBackup(); // break;

@zeigerpuppy
Copy link

@drwwww commenting out the lines in 17.0.2 to disable the backup doesn't work any more

@miarn
Copy link

miarn commented Apr 13, 2020

@drwwww commenting out the lines in 17.0.2 to disable the backup doesn't work any more

I succeeded in updating 17.0.3 to 18.0.3 by commenting out lines 1335-7 of nextcloud/updater/index.php as follows:

//	case 3:
//		$updater->createBackup();
//		break;

@miarn
Copy link

miarn commented Apr 13, 2020

I succeeded in updating 17.0.3 to 18.0.3

Just in case anyone else has the same issue, I also found that during Step 4, the download timed out. I got an error "Step 4 is currently in process. Please reload this page later".

I fixed it by:

  1. Downloading the 18.0.3 zip to my desktop
  2. Deleting the partly-downloaded .zip from /nextclouddata/updater-[random string]/downloads
  3. Replacing the deleted file with the proper file
  4. Editing /nextclouddata/updater-[random string]/.step by changing {"state":"start","step":4} to {"state":"start","step":5}
  5. Going back to the server settings menu, then re-starting the upgrade

@EV21
Copy link

EV21 commented Dec 12, 2020

Just to reference the development: You can disable the backup in CLI mode with --no-backup
see #292

@Nono-m0le
Copy link
Author

Just to reference the development: You can disable the backup in CLI mode with --no-backup
see #292

That's brilliant, thanks!

@GregorKopka
Copy link

The Updater bails with 'Backup failed' the moment it is unable top copy a single file (eg. a config.php~ because someone edited this file as root).
But it leaves the backup behind, starting a fresh one each time one retries, needlessly eating disk space.

IMHO:
Either the updater should list the error(s) and ask the user if this is OK and the update should continue,
or it should remove the failed backup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests