-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add documentation on how to free disk space #648
Comments
Hi @lucamanga, since you have already explored the topic (or at least you have an initial idea), would you like to give us a hand on this? To achieve that I would recommend start exploring some of built in Django management commands: 👇
Type 'manage.py help <subcommand>' for help on a specific subcommand.
Available subcommands:
[auth]
changepassword
createsuperuser
[authtoken]
drf_create_token
[base]
export_language_files
generate_secret_key_file
import_language_files
initadmin
set_passwords
update_modules
[contenttypes]
remove_stale_contenttypes
[core]
clear_db_logs
[django]
check
compilemessages
createcachetable
dbshell
diffsettings
dumpdata
flush
makemessages
makemigrations
migrate
sendtestemail
shell
showmigrations
sqlflush
sqlmigrate
sqlsequencereset
squashmigrations
startapp
startproject
test
testserver
[django_extensions]
admin_generator
clean_pyc
clear_cache
compile_pyc
create_command
create_jobs
create_template_tags
delete_squashed_migrations
describe_form
drop_test_database
dumpscript
export_emails
find_template
generate_password
generate_secret_key
graph_models
list_model_info
list_signals
mail_debug
merge_model_instances
notes
pipchecker
print_settings
print_user_for_session
reset_db
reset_schema
runjob
runjobs
runprofileserver
runscript
runserver_plus
set_default_site
set_fake_emails
set_fake_passwords
shell_plus
show_template_tags
show_urls
sqlcreate
sqldiff
sqldsn
sync_s3
syncdata
unreferenced_files
update_permissions
validate_templates
[django_file_form]
delete_unused_files
[djhuey]
run_huey
[drf_spectacular]
spectacular
[editing]
check_features_locked
migration_grant_to_atomic_permissions
[gis]
inspectdb
ogrinspect
[guardian]
clean_orphan_obj_perms
[modeltranslation]
loaddata
sync_translation_fields
update_translation_fields
[portal]
loaddata_picture
[rest_framework]
generateschema
[sessions]
clearsessions
[sitetree]
sitetree_resync_apps
sitetreedump
sitetreeload
[staticfiles]
collectstatic
findstatic
runserver
[usersmanage]
load_demo_dev_users_groups If you don't find the right one, please also try with writing a custom one to propose to the rest of us. Thanks in advance 👋 Raruto |
Ok, when I have time I'll see! Thank you for the hint |
@wlorenzetti I also found many orphaned files in here: I think because currently these are not removed when deleting a project/group (or when updating/uploading a previously loaded |
@Raruto I just make some tests, I try to create upload end delete the project inside G3W-ADMIN, but I don't have any orphans, also change the filename of the uploading .qgs file.. |
@wlorenzetti so? Can I delete all files in that folder? |
I think if you create cron than delete it every night it could be useful. |
For safety, I suggest to you the django command |
Here's how I reproduce it on 3.7-dev (docker install with BeforeAfter
@wlorenzetti @lucamanga docker users can also consider edit their entrypoint file accordingly to have it deleted every time the container is restarted: https://github.com/g3w-suite/g3w-suite-docker/blob/f90ce492fcb962969c0eb1b5d21611dadd36025b/scripts/ python3 /code/g3w-admin/manage.py delete_unused_files |
Ok, when uploading the project with project title updated |
Checklist
Motivation
I noticed that, over time, G3WSuite creates many temporary files.
Here are some "big" folders I found:
/tmp
there are many files like this (I'm using the docker version).../media/temp_upload
I have 3.221 qgs/qgz files, for a total directory size of 3.3GBSuggested solution
In the documentation, suggest a script to clean files (to run via crontab on night)
Alternatives considered
No response
The text was updated successfully, but these errors were encountered: