export (xml)-templates via cli

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
ebini
Posts: 21
Joined: Mon Mar 23, 2009 9:55 am

export (xml)-templates via cli

Post by ebini »

Hi,

i found a script to import xml-templates.

Is there also a cli-script to export (all) templates?


Thanks

Ebini
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

There has been a plugin approach. But I'm not sure if it ever was published. Please see plugin forum
R.
ebini
Posts: 21
Joined: Mon Mar 23, 2009 9:55 am

Post by ebini »

i've written a quick&dirty script.

Perhaps you want to add this to cacti and check/improove it.

Especially i'm unsure if i have chosen the correct tables (sqls) for the template-ids.

move it into the cli cacti directory.
The targetdirectory is needed to dump all xmls.

Ebini
Attachments
draft_export_template.zip
Draft for a cli-script to export all templates to a directory
(1.36 KiB) Downloaded 133 times
alchie
Posts: 4
Joined: Fri Jun 06, 2008 2:59 am

Re:

Post by alchie »

ebini wrote:i've written a quick&dirty script.
Perhaps you want to add this to cacti and check/improove it.
Ebini
Thank you for your script, Ebini.
I modified it a bit. Now it exports only one template with specified type/id.
This script should be placed into cacti cli directory
Attachments
export_template.php.zip
(1.4 KiB) Downloaded 65 times
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests