Closed bjrne closed 4 years ago
@maltezacharias Did you read somewhere that it's easily possible? I can't find anything on my first google search
I didn't see anything I just asked whether the check output is indeed on STDOUT or STDERR, cause in the latter case we can easily redirect it on dumpdata. If Django outputs the checks on STDOUT I don't think there is anything we can or should do about that unless there is an option or something. Personally I don't understand why you would run the checks on a dump command but that's Django's decision I presume.
What we could als try, dumpdata has an -o option, did you use that? I guess that would also solve it
No, I didn't use -o
Did a test. First of all there is --skip-checks
for django-admin dumpdata
. Which does what it says. Then there is -o
/ --output
which also does what it says and prevents the system check output from being included in the file. Mind you if using docker-compose ... exec
in a production setting you would then need to extract your file using a solution similar to backup.sh
.
So then this issue is about updating the Readme/documentation with the correct commands and possibly an explanation.
Mind you if using
docker-compose ... exec
in a production setting you would then need to extract your file using a solution similar tobackup.sh
docker-compose exec backend bash -c "python3 manage.py dumpdata --skip-checks" > dump.json
is probably the easier version
Currently, the output is on stdout, which prohibits for example the dumpdata command and possibly more. Using stdout is the cleaner solution anyway.