Before setting up the new version of taiga, I made a backup using the taiga-manage.sh dumpdata command. Now I have file called taiga_backup_7.json. But when I run taiga-manage.sh loaddata taiga_backup_7.json, I get CommandError: No fixture named 'taiga_backup_7' found.
The json file is in the same folder as taiga-manage.sh
I’m running the command as root and the json file has 0755 permissions
It doesn’t matter if I use the .json or .json.gz file I have
Using the full path /root/taiga/taiga_backup_7.json does not help either
dumpdata was done with Taiga 6.0 - at least, I think that was it. The one before the current one. We installed that version in january. Not sure which Postgres version was included there, sorry.
I tried the loaddata with the current taiga-docker version. So, Taiga 6.6.0 and Postgres 12
Thank you for looking into it!
Not sure if it helps, but for the dumpdata I wrote a little shellscript that was called daily by a cronjob. For the sake of completeness, I’ll post it here, so you can see exactly how the json was created:
# Set the directories
# Get the current date and time
# Run the dumpdata command and save the output to a file in the backup directory (redirect docker start message to nirwana!)
$TAIGA_DIR/taiga-manage.sh dumpdata > $BACKUP_DIR/taiga_backup_$DAY.json 2>/dev/null
# Compress the backup file using gzip
gzip -f $BACKUP_DIR/taiga_backup_$DAY.json
# Copy the attachments directory to a subfolder within the backup directory
test -d $MEDIA_DIR || mkdir -p $BACKUP_DIR/attachments
rsync -av $MEDIA_DIR $BACKUP_DIR/attachments/
you cannot use “loaddata” from your host with a file in your host and load in a container. You should copy the file inside the container and execute the command, which is not a recommended way of managing containers, as you may know
loaddata and dumpdata are not recommended for backups, as they are meant for initial data and testing according to the official documentation:
Fixtures can be used to pre-populate database with data for tests or to provide some initial data.