One of the great features that we offer users on our Professional and Team tiers is the ability to access project history. We don’t like to think about things going wrong, but sometimes you may need to revert to a previous version of your project for some reason. This can be as simple as going to the web-based dashboard, downloading the version of your project you want to revert to and creating a new project with the downloaded file using the QGIS Plug-in.
How do I download larger projects?
You might find that you get an error message when you try to download the project file from the dashboard because the project size is too large. There is a limit on the dashboard of 1GB for project size to be downloaded. However, larger projects can be downloaded using the Python Console in QGIS. Don’t worry if you are not proficient with Python, we’re going to show you exactly how to do this, all you need to do is follow these steps:
1. Open QGIS and make sure you are logged in to the Mergin Maps plugin
2. Open the Python console by clicking on the ‘Python’ icon or pressing ‘CTRL+ALT+P’ on your keyboard.
3. Click on the ‘Show Editor’ button to open the script editor.
4. Enter the script in the box below into the script editor that opens on the right hand side, replace the values for the following with your information:
- my_username
- my_password
- my_workspace
- my_project
- project_version
- work_dir - only change the directory path inside the first set of quotation marks and end your directory path with a double backslash '\\'
from Mergin.mergin import MerginClient
my_username = "your username"
my_password = "your password"
my_workspace = "your workspace"
my_project = "project name"
project_version = "v2"
work_dir = r"C:\desired\path\to_download" + f"{my_project}"
mc = MerginClient(login=my_username, password=my_password)
mc.download_project(f"{my_workspace}/{my_project}",work_dir,version=project_version)
Once you have entered your information, you can optionally save the script as a file in your project folder so that you can use it again if needed.
5. Press the green 'Run Script' button above the window on the right and it will run the script and download the project to the folder you specified.