Backup and restore NAV DB programmatically

Hi, I have a unique requirement. I have to take backup of NAV company from one NAV DB and then restore that company in another NAV DB. I have to do this with a single click. Is it possible to do this programmatically? I am trying to do this using C\FRONT but I can’t find an API which can do this and the main problem is that I have to do this in NAV2009 R2 … :frowning:

The only company in the DB or one of several companies?

In first case it can be easily done by MSSQL means, and it will be much quicker than from NAV itself, especially the restore part which then doesn’t require extra time for creating indices.

If it is one of several companies, then it’s much harder task, as normally MSSQL doesn’t offer methods to restore PART of tables in a database, although it can be done.

Then, if you can’t / don’t want to use MSSQL methods, you may be interested in this Waldo’s blog article: Running PowerShell from NAV

My guess (although not stated in the question) that the reason this is a “problem” and the normal backup functions doesn’t work, that this is a case of “native” database on a NAV 2009 R2 classic?

But if it’s the “native” NAV database, then I can recommend Expandit’s Backup Utility: