Hi @foadlind
can you help me please?
First question: I used the backup plugin and successfully installed and enabled it, but when I restore, it displays this message :
⚠️ You are running Tutor as root. This is strongly not recommended. If you are doing this in order to access the Docker daemon, you should instead add your user to the 'docker' group. (see https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user)
docker compose -f /root/.local/share/tutor/env/local/docker-compose.yml -f /root/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local -f /root/.local/share/tutor/env/local/docker-compose.jobs.yml run --rm backup-job sh -e -c 'python restore_services.py --date=2023-12-04 --exclude=caddy'
[+] Creating 4/0
✔ Container tutor_local-caddy-1 Running 0.0s
✔ Container tutor_local-mysql-1 Running 0.0s
✔ Container tutor_local-permissions-1 Created 0.0s
✔ Container tutor_local-mongodb-1 Running 0.0s
[+] Running 1/1
✔ Container tutor_local-permissions-1 Started 0.3s
2023-12-04 07:11:55,005 INFO Extracting archive /data/backup/backup.2023-12-04.tar.xz to /data
2023-12-04 07:11:55,044 INFO Complete. /data is 6545890 bytes.
2023-12-04 07:11:55,044 INFO Restoring MySQL databases on mysql:3306 from /data/mysql_dump.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 3552 (HY000) at line 24: Access to system schema 'mysql' is rejected.
Traceback (most recent call last):
File "restore_services.py", line 258, in <module>
main()
File "/s3/venv/lib/python3.8/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/s3/venv/lib/python3.8/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/s3/venv/lib/python3.8/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/s3/venv/lib/python3.8/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "restore_services.py", line 250, in main
restore_mysql()
File "restore_services.py", line 50, in restore_mysql
check_call(mysql_cmd,
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'mysql --host=mysql --port=3306 --user=root --password=uTGAkVTr' returned non-zero exit status 1.
Error: Command failed with status 1: docker compose -f /root/.local/share/tutor/env/local/docker-compose.yml -f /root/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local -f /root/.local/share/tutor/env/local/docker-compose.jobs.yml run --rm backup-job sh -e -c python restore_services.py --date=2023-12-04 --exclude=caddy
where does the problem come from, and I ran it with the following command :
root@HP-OMEN-17:~/.local/share/tutor/env/build/openedx/themes/indigo/lms/static/images# tutor local restore --exclude=mysql
it answered
⚠️ You are running Tutor as root. This is strongly not recommended. If you are doing this in order to access the Docker daemon, you should instead add your user to the 'docker' group. (see https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user)
docker compose -f /root/.local/share/tutor/env/local/docker-compose.yml -f /root/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local -f /root/.local/share/tutor/env/local/docker-compose.jobs.yml run --rm backup-job sh -e -c 'python restore_services.py --date=2023-12-04 --exclude=mysql --exclude=caddy'
[+] Creating 4/0
✔ Container tutor_local-permissions-1 Created 0.0s
✔ Container tutor_local-mongodb-1 Runn... 0.0s
✔ Container tutor_local-caddy-1 Runnin... 0.0s
✔ Container tutor_local-mysql-1 Runnin... 0.0s
[+] Running 1/1
✔ Container tutor_local-permissions-1 Started 0.2s
2023-12-04 07:08:04,393 INFO Extracting archive /data/backup/backup.2023-12-04.tar.xz to /data
2023-12-04 07:08:04,432 INFO Complete. /data is 6545890 bytes.
2023-12-04 07:08:04,432 INFO Restoring MongoDB databases on mongodb:27017 from /data/mongodb_dump
2023-12-04T07:08:04.464+0000 preparing collections to restore from
2023-12-04T07:08:04.464+0000 reading metadata for openedx.modulestore.active_versions from /data/mongodb_dump/openedx/modulestore.active_versions.metadata.json
2023-12-04T07:08:04.464+0000 reading metadata for openedx.modulestore.definitions from /data/mongodb_dump/openedx/modulestore.definitions.metadata.json
2023-12-04T07:08:04.464+0000 reading metadata for openedx.modulestore.structures from /data/mongodb_dump/openedx/modulestore.structures.metadata.json
2023-12-04T07:08:04.464+0000 dropping collection openedx.modulestore.structures before restoring
2023-12-04T07:08:04.464+0000 dropping collection openedx.modulestore.active_versions before restoring
2023-12-04T07:08:04.464+0000 dropping collection openedx.modulestore.definitions before restoring
2023-12-04T07:08:04.540+0000 restoring openedx.modulestore.structures from /data/mongodb_dump/openedx/modulestore.structures.bson
2023-12-04T07:08:04.551+0000 restoring openedx.modulestore.definitions from /data/mongodb_dump/openedx/modulestore.definitions.bson
2023-12-04T07:08:04.551+0000 finished restoring openedx.modulestore.structures (26 documents, 0 failures)
2023-12-04T07:08:04.562+0000 restoring openedx.modulestore.active_versions from /data/mongodb_dump/openedx/modulestore.active_versions.bson
2023-12-04T07:08:04.562+0000 finished restoring openedx.modulestore.definitions (15 documents, 0 failures)
2023-12-04T07:08:04.573+0000 finished restoring openedx.modulestore.active_versions (1 document, 0 failures)
2023-12-04T07:08:04.573+0000 no indexes to restore for collection openedx.modulestore.definitions
2023-12-04T07:08:04.573+0000 no indexes to restore for collection openedx.modulestore.structures
2023-12-04T07:08:04.573+0000 no indexes to restore for collection openedx.modulestore.active_versions
2023-12-04T07:08:04.573+0000 42 document(s) restored successfully. 0 document(s) failed to restore.
2023-12-04 07:08:04,574 INFO MongoDB restored.
is the problem with restoring mysql?
Second question: Is this plugin suitable for transferring the entire platform, including courses, user information, exams, and themes and all customization and configuration?