Developer forum

Forum » Development » Feasibility: daily bacpac import into DW/Truvio backend

Feasibility: daily bacpac import into DW/Truvio backend

Wilfred Polderman
Reply

Hi form,

As far as I know, a bacpac is generated server-side every day, but this is only accessible on the server itself and not in the Truvio backend.

Would it be possible to have these daily auto-generated bacpacs imported into the DW/Truvio backend? We already have a custom retention app that can delete files after a set number of days, so storage won't be an issue.

Is this feasible, or would it require us to build a custom DLL to generate these bacpacs ourselves daily?

Thanks in advance!

Kind regards,
Wilfred Polderman


Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Wilfred,

We do not auto-generate a bacpac file of solutions every day. All solutions are backed up daily, but that's not done using bacpac as far as I know. Can I just ask why you need this?

However, you can generate a bacpac file for your solution on demand using this feature, and the process can be automated by either uploading the trigger file once per day or create a scheduled task that generates the file. Be aware that it may have an impact on the performance of the site, so choose a time that will affect the least amount of users: https://doc.dynamicweb.dev/documentation/fundamentals/setup/hosting/dynamicweb-cloud.html#database-backup

- Jeppe

 
Wilfred Polderman
Reply

Hi Jeppe,
Thank you for your reply.

We'd like to have more frequent backups available for our clients, so that if something breaks, we can restore quickly for that specific client.

You mentioned: 'you can generate a bacpac file for your solution on demand using this feature'. With 'this feature' do you mean manually creating the backup.txt trigger file?

I'd like to automate this on a daily basis. Is there an existing DynamicWeb feature/setting to schedule this automatically, or would we need to build this ourselves as a custom scheduled task (e.g. via a custom Scheduled Task Add-in/App)?

Extra question: is it also possible to create a full solution backup (files/code, not just the database) ourselves, and automate this?

Thanks in advance.

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Wilfred,

That's fine, but there are a couple of points I'd like to emphasize.

  • There are already backups of sites every day, so a restore is possible without any additional work; just contact Care or Operations
    • You're also talking about daily backups so they are not more frequent that the ones that are already made
  • If the site breaks and you cannot access it, then you also cannot restore the database -- even if you have the bacpac file -- without contacting Care or Operations
  • Generating a bacpac file can be disruptive to the site's visitors, so choose your backup time window carefully

To your specific questions. Yes, the feature I was referring to was the backup trigger file. No, there's no built-in scheduler for bacpac generation. You'd have to make something that puts the backup.txt trigger file into the right folder manually. This can either be a scheduled task add-in -- or another custom add-in that you code -- or external automation using the CLI or the Management API to upload it. You can also use the Truvio Commerce Cloud Desktop to upload the file, but it's not great for scripting/automation. Different approaches where one is managed inside DynamicWeb and one that is managed externally.

Regarding full solution backup. The closest you can get to that is a backup of the Files folder. You can use the CLI or the Truvio Commerce Cloud Desktop to connect to the solution and download the files and folders you want to backup. You will not be able to backup the application bin folder or the web.config file, but you shouldn't really need that anyway. You should already have a local development environment with the Files, custom code and the application, and if you're using the Ring packages from NuGet, they are in sync with the rollouts in DynamicWeb Cloud. At most, you need to bring down any changed files on the production site and that can be targeted and automated using, for example, the CLI.

More information:

I hope that clarifies my previous post.

- Jeppe

 

You must be logged in to post in the forum