nextcloud / nextcloud/desktop

error handling / reporting with `nextcloudcmd`

Open
#6,708 0 comments 1 reaction 0 assignees View on GitHub
feature: :white_square_button: nextcloudcmd
Dominant language
C++
Stars
3.9k
Forks
1k
Avg merge
1d 17h
Merged PRs (30d)
123

Description

This is a feature request for _**nextcloudcmd**_.
I initially started with _**nextcloudcmd**_ in CLI mode without the _**-s**_ option. I was attempting to run an initial sync on about 100Mb of data but was successful in only achieving about 32Mb of data being transferred with "Too many files" (or similar warning). I discovered, and included, the _**'bulkupload.enabled' => false,**_ variable for the config/config.php file which solved that problem.
It was quite obvious that without the _**-s**_ option the volume of output was unreasonable especially on the scale that I was trying to operate, but inclusion of the _**-s**_ option did exactly what it states - silence.
As _**nextcloudcmd**_ is a "one shot" command I wanted to create a _**cron**_ job to run some form of backup on a headless remote server. I therefore created the following _**crontab**_ entry on that server:
`05 04 * * * date ; nextcloudcmd --silent --non-interactive --user xxxxxx --password yyyyyy /var/www/html/joomla https://howard.id.au/nextcloud ; echo $? ; date`
This sends me an email each time it runs and the time interval between the two _**date**_ statements is consistent with the volume of sync that I would expect on each occasion. Unfortunately the _**echo $?**_ statement consistently returns the value _**1**_ and I am assuming that that indicates the main process terminated with an error, but because of the _**--silent**_ option there is no indication of what that error might be.

I therefore suggest the following enhancements:

- Improved _**man**_ documentation including a suggestion that _**'bulkupload.enabled' => false,**_ may need to be included in the config.php file.
- Some way of limiting the volume of output when _**-s**_ is omitted, but still providing error reporting.
- Some means of reporting the source that causes a _**$?**_ terminating responce other than _**0**_.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.