Clone a Device Group?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Palo Alto Networks Approved
Palo Alto Networks Approved
Community Expert Verified
Community Expert Verified

Clone a Device Group?

L2 Linker

Hi Guys,

 

I have Panorama with a few device groups; how do I clone one of them from GUI so I can do testing without impacting a production device group?

 

Thanks

2 accepted solutions

Accepted Solutions

Cyber Elite
Cyber Elite

unfortunately you can't do that from the GUI directly in one fell swoop

you can create a new device group, then go into the donor device group, select all the objects you need and 'clone' them into the new device group

if you're a bit of a CLI jockey, you can go into CLI, run `set cli configuration-output-format set`, go into configure mode, and run 'show | match <donordevicegroup>`

copy and paste the set commands into a text editor, find&replace the device group name with a new name and then copy&paste back into the CLI

Tom Piens
PANgurus - Strata specialist; config reviews, policy optimization

View solution in original post

Hi @tinhnho , @reaper ,

What about the following approach:

1. Export Panorama running-config and selecting only the device-group you want clone

Astardzhiev_0-1677794864979.png

 

2. Open the exported XML with text editor and change the name of the device-group with name you wish to use for the cloning/new group

Astardzhiev_1-1677794950662.png

 

3. Back to Panorama GUI create the new device-group from Panorama -> Device-Groups. Use the same name as you put in the updated XML

4. Import the edited XML back to Panorama (remember to rename the file before importing and not using "running-config").

5. Load the XML config you just imported and select only the newly created (empty at the moment) device-group

Astardzhiev_2-1677795204032.png

 

6. Once the load is complete, you should have newly created device-group with all rules and objected copied from the donor group

 

(Optional) Once you have commited all the changes and the new device-group is ready you may want to delete the imported/save config file as it is not required anymore and only take space:

> delete config saved test-clone.xml

View solution in original post

3 REPLIES 3

Cyber Elite
Cyber Elite

unfortunately you can't do that from the GUI directly in one fell swoop

you can create a new device group, then go into the donor device group, select all the objects you need and 'clone' them into the new device group

if you're a bit of a CLI jockey, you can go into CLI, run `set cli configuration-output-format set`, go into configure mode, and run 'show | match <donordevicegroup>`

copy and paste the set commands into a text editor, find&replace the device group name with a new name and then copy&paste back into the CLI

Tom Piens
PANgurus - Strata specialist; config reviews, policy optimization

Thanks. I've created a new DG in Panorama and ready to clone objects. When I'm in the Address of donor DG, is there a way to select all items in the Address and clone them all at one? as of now, I have to select each of items manually and  there are thousands of them in Address. 

Hi @tinhnho , @reaper ,

What about the following approach:

1. Export Panorama running-config and selecting only the device-group you want clone

Astardzhiev_0-1677794864979.png

 

2. Open the exported XML with text editor and change the name of the device-group with name you wish to use for the cloning/new group

Astardzhiev_1-1677794950662.png

 

3. Back to Panorama GUI create the new device-group from Panorama -> Device-Groups. Use the same name as you put in the updated XML

4. Import the edited XML back to Panorama (remember to rename the file before importing and not using "running-config").

5. Load the XML config you just imported and select only the newly created (empty at the moment) device-group

Astardzhiev_2-1677795204032.png

 

6. Once the load is complete, you should have newly created device-group with all rules and objected copied from the donor group

 

(Optional) Once you have commited all the changes and the new device-group is ready you may want to delete the imported/save config file as it is not required anymore and only take space:

> delete config saved test-clone.xml
  • 2 accepted solutions
  • 6124 Views
  • 3 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!