My server disk is currently full (100%) and stuck in a pending update state. I cannot log in to my server to execute normal admin tasks nor can I log in to free up space. The browser responds with: ERR_CONNECTION_REFUSED or shows a generic NextCloud error screen.
In order to complete the update I am trying to free up space. Listing available occ commands does not show trashbin as an option
sudo nextcloud.occ list
so I am unable to use the native occ command to clear out the trash.
Navigating to
/var/snap/nextcloud/common/nextcloud/data/[user]
shows a files_trashbin
directory that has allot of documents in it.
Running
du -sh
on files_trashbin shows ~200G of data.
Is this (files_trashbin) a directory that can be cleared manually? Or is there a more acceptable way of clearing the trash?
assuming this is a snap install and your refresh to 29.0.7snap1 has failed due to disk space issues:
see also database-maitenance the first part may help.
and see truncate logs for freeing up space.
similar steps for other installs…
so I’m just guessing… if you delete those files in files_trashbin
directory as root manually, you wouldn’t really be breaking anything? you’d need to rescan files afterwards.
its a good idea to have a backup: Backup, restore & migrate
I would obviously prefer to use the trashbin command but per my feedback it isn’t a listed option, infact executing it returns:
There are no commands defined in the "trashbin" namespace.
At this point it seems like my only option would be to manually remove files but I am concerned that the command list also doesn’t include the files namespace.
Current version: 29.0.6
occ list output:
Usage:
command [options] [arguments]
Options:
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
--no-warnings Skip global warnings, show command output only
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
check check dependencies of the server environment
completion Dump the shell completion script
help Display help for a command
list List commands
setupchecks Run setup checks and output the results
status show some status information
upgrade run upgrade routines after installation of a new release. The release has to be installed before.
app
app:disable disable an app
app:enable enable an app
app:getpath Get an absolute path to the app directory
app:install install an app
app:list List all available apps
app:remove remove an app
app:update update an app or all apps
background
background:ajax Use ajax to run background jobs
background:cron Use cron to run background jobs
background:webcron Use webcron to run background jobs
background-job
background-job:delete Remove a background job from database
background-job:execute Execute a single background job manually
background-job:list List background jobs
broadcast
broadcast:test test the SSE broadcaster
config
config:app:delete Delete an app config value
config:app:get Get an app config value
config:app:set Set an app config value
config:import Import a list of configs
config:list List all configs
config:system:delete Delete a system config value
config:system:get Get a system config value
config:system:set Set a system config value
db
db:add-missing-columns Add missing optional columns to the database tables
db:add-missing-indices Add missing indices to the database tables
db:add-missing-primary-keys Add missing primary keys to the database tables
db:convert-filecache-bigint Convert the ID columns of the filecache to BigInt
db:convert-mysql-charset Convert charset of MySQL/MariaDB to use utf8mb4
db:convert-type Convert the Nextcloud database to the newly configured one
encryption
encryption:change-key-storage-root Change key storage root
encryption:decrypt-all Disable server-side encryption and decrypt all files
encryption:disable Disable encryption
encryption:enable Enable encryption
encryption:encrypt-all Encrypt all files for all users
encryption:list-modules List all available encryption modules
encryption:migrate-key-storage-format Migrate the format of the keystorage to a newer format
encryption:set-default-module Set the encryption default module
encryption:show-key-storage-root Show current key storage root
encryption:status Lists the current status of encryption
group
group:add Add a group
group:adduser add a user to a group
group:delete Remove a group
group:info Show information about a group
group:list list configured groups
group:removeuser remove a user from a group
info
info:file get information for a file
info:file:space Summarize space usage of specified folder
integrity
integrity:check-app Check integrity of an app using a signature.
integrity:check-core Check integrity of core code using a signature.
integrity:sign-app Signs an app using a private key.
integrity:sign-core Sign core using a private key.
l10n
l10n:createjs Create javascript translation files for a given app
log
log:file manipulate logging backend
log:manage manage logging configuration
maintenance
maintenance:data-fingerprint update the systems data-fingerprint after a backup is restored
maintenance:mimetype:update-db Update database mimetypes and update filecache
maintenance:mimetype:update-js Update mimetypelist.js
maintenance:mode set maintenance mode
maintenance:repair repair this installation
maintenance:repair-share-owner repair invalid share-owner entries in the database
maintenance:theme:update Apply custom theme changes
maintenance:update:htaccess Updates the .htaccess file
metadata
metadata:get get stored metadata about a file, by its id
migrations
migrations:preview Get preview of available DB migrations in case of initiating an upgrade
preview
preview:generate generate a preview for a file
preview:repair distributes the existing previews into subfolders
preview:reset-rendered-texts Deletes all generated avatars and previews of text and md files
security
security:bruteforce:attempts Show bruteforce attempts status for a given IP address
security:bruteforce:reset resets bruteforce attempts for given IP address
security:certificates list trusted certificates
security:certificates:import import trusted certificate in PEM format
security:certificates:remove remove trusted certificate
tag
tag:add Add new tag
tag:delete delete a tag
tag:edit edit tag attributes
tag:list list tags
twofactorauth
twofactorauth:cleanup Clean up the two-factor user-provider association of an uninstalled/removed provider
twofactorauth:disable Disable two-factor authentication for a user
twofactorauth:enable Enable two-factor authentication for a user
twofactorauth:enforce Enabled/disable enforced two-factor authentication
twofactorauth:state Get the two-factor authentication (2FA) state of a user
user
user:add adds an account
user:auth-tokens:add [user:add-app-password] Add app password for the named account
user:auth-tokens:delete Deletes an authentication token
user:auth-tokens:list List authentication tokens of an user
user:delete deletes the specified user
user:disable disables the specified user
user:enable enables the specified user
user:info show user info
user:keys:verify Verify if the stored public key matches the stored private key
user:lastseen shows when the user was logged in last time
user:list list configured users
user:report shows how many users have access
user:resetpassword Resets the password of the named user
user:setting Read and modify user settings
user:sync-account-data sync user backend data to accounts table for configured users
That’s probably because you’re in a pending update state.
Just use the standard Linux rm
command, then finish the update, and run occ files:scan --all
after the update successfully finished.
Oh, and you should probably back up all the files before you go ahead.
Thank you @bb77 and @scubamuc for the help.
@bb77 you were right about the trashbin
command, I went back to the error message and saw that it stated that limited commands are available while pending the update. After deleting the files in the users’ files_trashbin/files
directory the server recovered and I was able to complete the update and clear out the trashed items.
In summary - it seems safe to manually delete content from the users’ files_trashbin/files
directory but should only be considered if no other options are available and the computer disk is at 100% capacity.
This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.