Jump to content
Ketarin forum

Is there still no way to automatically export commands to an xml?


ajs21
 Share

Recommended Posts

I have made a script that checks for directories and makes them if they are not present. Then exports and backs up the apps list and copies the Database file to a backup folder. Also creates a log file in the Backup directory. I also would like to export the commands to an xml to make a backup. I see you can export the commands manually to a file. Is there no command to do this automatically?

Here are the PowerShell commands I am currently using. 

$directoyPath="Backup";
if(!(Test-Path -path $directoyPath))  
{  
    New-Item -ItemType directory -Path $directoyPath      
}

$directoyPath=".\Backup\Database";
if(!(Test-Path -path $directoyPath))  
{  
    New-Item -ItemType directory -Path $directoyPath      
}

$directoyPath=".\Backup\CommandsExport";
if(!(Test-Path -path $directoyPath))  
{  
    New-Item -ItemType directory -Path $directoyPath      
}

$directoyPath=".\Backup\ExportAppList";
if(!(Test-Path -path $directoyPath))  
{  
    New-Item -ItemType directory -Path $directoyPath      
}

$directoyPath=".\Backup\Logs";
if(!(Test-Path -path $directoyPath))  
{  
    New-Item -ItemType directory -Path $directoyPath      
}

Copy-Item -Force -Recurse -Verbose '~\AppData\Roaming\Ketarin\jobs.db' '.\Backup\DataBase\jobs'

Start-Process ketarin.exe {/export=Backup\ExportAppList\ExportList.xml /log=Backup\Logs\Logfile.txt}

 

Link to comment
Share on other sites

  • 1 month later...

"Automatically" in the sense that it happens on a regular basis, without user interaction, or via some form of switch? As I'm sure you know, /export includes the app commands as well as all other app-specific properties.

I suspect you might actually be talking about the global commands. If so, they're included in your jobs.db backup, but you can export those to an external file using Sqlite, DB4S, powershell with an sqlite assembly, or your favorite SQLite editor:

SELECT `SettingPath`,`SettingValue` FROM `settings` WHERE
`SettingPath` IN (
'PostUpdateCommand','PostUpdateCommandType',
'PreUpdateCommand','PreUpdateCommandType',
'UpdateFailedCommand','UpdateFailedCommandType'
);

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.