{"id":271,"date":"2024-12-20T07:37:01","date_gmt":"2024-12-20T15:37:01","guid":{"rendered":"https:\/\/www.cmsws.com\/blog\/?page_id=271"},"modified":"2024-12-20T08:46:08","modified_gmt":"2024-12-20T16:46:08","slug":"using-ubiquiti-cli-tool-ucfg","status":"publish","type":"page","link":"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/","title":{"rendered":"Ubiquiti cli tool: ucfg"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"alignright is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/help.ui.com\/hc\/theming_assets\/01J4TZ2K9CZRQYG6V1BCC0XN61\" alt=\"Ubiquiti Logo\" width=\"357\" height=\"108\"\/><\/figure>\n<\/div>\n\n\n<p><strong>Instructional Manual for Using the Ubiquiti CLI Tool <code>ucfg<\/code><\/strong><\/p><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-right counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#Introduction\" >Introduction<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#Usage_Syntax\" >Usage Syntax<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#Options\" >Options:<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#Available_Commands\" >Available Commands<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#1_Boot_Early\" >1. Boot Early<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#2_Start_the_System\" >2. Start the System<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#3_Stop_the_System\" >3. Stop the System<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#4_Commit_Configuration\" >4. Commit Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#5_Reset_to_Factory_Defaults\" >5. Reset to Factory Defaults<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#6_Reload_Configuration\" >6. Reload Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#7_Backup_Management\" >7. Backup Management<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#8_Edit_Configuration\" >8. Edit Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#9_Show_Configuration\" >9. Show Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#10_Migrate_Configuration\" >10. Migrate Configuration<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#Examples\" >Examples<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#1_Debugging_Mode\" >1. Debugging Mode<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#2_Reset_to_Factory_Defaults_with_Reboot\" >2. Reset to Factory Defaults with Reboot<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#3_Commit_Changes\" >3. Commit Changes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#4_Show_Current_Configuration\" >4. Show Current Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#5_Start_the_System_with_a_Specific_Configuration\" >5. Start the System with a Specific Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#6_Create_a_Backup\" >6. Create a Backup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#7_Validate_a_Backup\" >7. Validate a Backup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#8_Restore_a_Backup_Without_Validation\" >8. Restore a Backup Without Validation<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#Troubleshooting_Tips\" >Troubleshooting Tips<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#Best_Practices\" >Best Practices<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-27\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Introduction\"><\/span><strong>Introduction<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The Ubiquiti CLI tool <code>ucfg<\/code> is a command-line interface for system configuration management on Ubiquiti devices. This manual provides a comprehensive guide to using the tool effectively based on its actual commands and options.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span><strong>Prerequisites<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Device Requirements:<\/strong>\n<ul class=\"wp-block-list\">\n<li>A Ubiquiti device with CLI support (e.g., UniFi switches, routers, or access points).<\/li>\n\n\n\n<li>Ensure the device firmware includes the <code>ucfg<\/code> tool.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Access Requirements:<\/strong>\n<ul class=\"wp-block-list\">\n<li>SSH access to the Ubiquiti device.<\/li>\n\n\n\n<li>Administrator credentials.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Client Requirements:<\/strong>\n<ul class=\"wp-block-list\">\n<li>A terminal emulator (e.g., PuTTY, Terminal, or any SSH client).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Network Requirements:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Ensure the device is reachable over the network.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Usage_Syntax\"><\/span><strong>Usage Syntax<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The general syntax of the <code>ucfg<\/code> tool is as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg (&#91;-d] | &#91;-t]) &#91;-h] &#91;-S] &lt;command&gt; ...\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Options\"><\/span><strong>Options:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-d, --debug<\/code>: Enable debugging output for detailed information during execution.<\/li>\n\n\n\n<li><code>-t, --trace<\/code>: Enable tracing output for more granular command behavior details.<\/li>\n\n\n\n<li><code>-h, --help<\/code>: Display the help message with a list of available commands.<\/li>\n\n\n\n<li><code>-S, --silent<\/code>: Suppress output to <code>stdout<\/code>.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Available_Commands\"><\/span><strong>Available Commands<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Boot_Early\"><\/span><strong>1. Boot Early<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Perform actions needed for early boot:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg boot-early &#91;-h]\n<\/code><\/pre>\n\n\n\n<p>Options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Start_the_System\"><\/span><strong>2. Start the System<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Start the system using a configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg start &#91;-h] &#91;&lt;path&gt;]\n<\/code><\/pre>\n\n\n\n<p>Arguments:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>path<\/code>: Path to a file containing configuration to start from.<\/li>\n<\/ul>\n\n\n\n<p>Options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Stop_the_System\"><\/span><strong>3. Stop the System<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Stop the system:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg stop &#91;-h]\n<\/code><\/pre>\n\n\n\n<p>Options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Commit_Configuration\"><\/span><strong>4. Commit Configuration<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Save the active configuration to persistent memory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg commit &#91;-h] &#91;&lt;path&gt;]\n<\/code><\/pre>\n\n\n\n<p>Arguments:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>path<\/code>: Path to a file containing the configuration to commit.<\/li>\n<\/ul>\n\n\n\n<p>Options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_Reset_to_Factory_Defaults\"><\/span><strong>5. Reset to Factory Defaults<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Reset the system configuration to factory defaults:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg defaults (&#91;-r] | &#91;-R]) &#91;-h]\n<\/code><\/pre>\n\n\n\n<p>Options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-r, --reload<\/code>: Reload configuration after resetting.<\/li>\n\n\n\n<li><code>-R, --reboot<\/code>: Reboot the device after resetting.<\/li>\n\n\n\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6_Reload_Configuration\"><\/span><strong>6. Reload Configuration<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Reload the system configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg reload &#91;-h] &#91;-c] &#91;-C] &lt;path&gt;\n<\/code><\/pre>\n\n\n\n<p>Arguments:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>path<\/code>: Path to a file containing the new configuration.<\/li>\n<\/ul>\n\n\n\n<p>Options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-c, --commit<\/code>: Commit configuration after reload.<\/li>\n\n\n\n<li><code>-C, --continuous<\/code>: Reload configuration again if it changes during the reload.<\/li>\n\n\n\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"7_Backup_Management\"><\/span><strong>7. Backup Management<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Manage system backups:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg backup &#91;-h] &lt;command&gt; ...\n<\/code><\/pre>\n\n\n\n<p>Commands:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>create<\/code>: Create a system backup.<\/li>\n\n\n\n<li><code>validate<\/code>: Validate a system backup: <code>ucfg backup validate [-h] &lt;path&gt;<\/code> Arguments:<ul><li><code>path<\/code>: Path to a file containing the system backup.<\/li><\/ul>Options:\n<ul class=\"wp-block-list\">\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>restore<\/code>: Restore system from a backup: <code>ucfg backup restore [-h] [-r] [-N] &lt;path&gt;<\/code> Arguments:<ul><li><code>path<\/code>: Path to a file containing the system backup.<\/li><\/ul>Options:\n<ul class=\"wp-block-list\">\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n\n\n\n<li><code>-r, --reload<\/code>: Reload configuration after done.<\/li>\n\n\n\n<li><code>-N, --no-validate<\/code>: Do not validate configuration before restoring.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"8_Edit_Configuration\"><\/span><strong>8. Edit Configuration<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Edit and load configuration using a filter expression:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg edit &#91;-h] &#91;-c] &#91;&lt;filter&gt;]\n<\/code><\/pre>\n\n\n\n<p>Arguments:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>filter<\/code>: Modify the configuration using a jq-like filter expression.<\/li>\n<\/ul>\n\n\n\n<p>Options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-c, --commit<\/code>: Commit configuration after editing.<\/li>\n\n\n\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"9_Show_Configuration\"><\/span><strong>9. Show Configuration<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Display the current configuration in a human-readable format:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg show &#91;-h] &#91;&lt;path&gt;]\n<\/code><\/pre>\n\n\n\n<p>Arguments:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>path<\/code>: Path to a file containing the configuration to show.<\/li>\n<\/ul>\n\n\n\n<p>Options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"10_Migrate_Configuration\"><\/span><strong>10. Migrate Configuration<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Migrate configuration to a specific version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg migrate &#91;-h] &lt;old_path&gt; &lt;target_version&gt; &lt;new_path&gt;\n<\/code><\/pre>\n\n\n\n<p>Arguments:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>old_path<\/code>: Path to the configuration file to be migrated.<\/li>\n\n\n\n<li><code>target_version<\/code>: Version to migrate to.<\/li>\n\n\n\n<li><code>new_path<\/code>: Path where the migrated configuration should be saved.<\/li>\n<\/ul>\n\n\n\n<p>Options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Examples\"><\/span><strong>Examples<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Debugging_Mode\"><\/span><strong>1. Debugging Mode<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Enable detailed output to troubleshoot configuration issues:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg -d show\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Reset_to_Factory_Defaults_with_Reboot\"><\/span><strong>2. Reset to Factory Defaults with Reboot<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Reset the system to its original state and reboot:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg defaults -R\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Commit_Changes\"><\/span><strong>3. Commit Changes<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Save active changes to persistent memory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg commit\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Show_Current_Configuration\"><\/span><strong>4. Show Current Configuration<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Display the current device configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg show\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_Start_the_System_with_a_Specific_Configuration\"><\/span><strong>5. Start the System with a Specific Configuration<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Start the system using a configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg start \/path\/to\/config.json\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6_Create_a_Backup\"><\/span><strong>6. Create a Backup<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Create a system backup:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg backup create\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"7_Validate_a_Backup\"><\/span><strong>7. Validate a Backup<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Validate a system backup:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg backup validate \/path\/to\/backup.file\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"8_Restore_a_Backup_Without_Validation\"><\/span><strong>8. Restore a Backup Without Validation<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Restore a backup and skip validation:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg backup restore -N \/path\/to\/backup.file\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Troubleshooting_Tips\"><\/span><strong>Troubleshooting Tips<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Enable Debugging:<\/strong> Use the <code>-d<\/code> option for detailed logs to troubleshoot errors: <code>ucfg -d &lt;command&gt;<\/code><\/li>\n\n\n\n<li><strong>Test Changes:<\/strong> Use the <code>-t<\/code> option to test commands without applying them: <code>ucfg -t &lt;command&gt;<\/code><\/li>\n\n\n\n<li><strong>Restore Backups:<\/strong> Use the <code>backup<\/code> command to recover previous configurations: <code>ucfg backup restore<\/code><\/li>\n\n\n\n<li><strong>Check for Help:<\/strong> Refer to the help message for clarification on available commands: <code>ucfg -h<\/code><\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Best_Practices\"><\/span><strong>Best Practices<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Backup Regularly:<\/strong> Always create backups before making significant changes.<\/li>\n\n\n\n<li><strong>Use Debugging for Troubleshooting:<\/strong> Enable debugging to get detailed insights into operations.<\/li>\n\n\n\n<li><strong>Validate Changes in Test Mode:<\/strong> Use the <code>-t<\/code> flag to test configurations before applying them.<\/li>\n\n\n\n<li><strong>Document Configuration Changes:<\/strong> Maintain a log of changes for easier troubleshooting and rollback.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span><strong>Conclusion<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The <code>ucfg<\/code> CLI tool provides robust functionality for managing and configuring Ubiquiti devices. By following this guide, you can effectively utilize the tool to optimize and maintain your network infrastructure.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Instructional Manual for Using the Ubiquiti CLI Tool ucfg Introduction The Ubiquiti CLI tool ucfg is a command-line interface for system configuration management on Ubiquiti devices. This manual provides a comprehensive guide to using the tool effectively based on its actual commands and options. Prerequisites Usage Syntax The general syntax of the ucfg tool is as follows: Options: Available Commands [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":272,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-271","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/pages\/271","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/comments?post=271"}],"version-history":[{"count":6,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/pages\/271\/revisions"}],"predecessor-version":[{"id":283,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/pages\/271\/revisions\/283"}],"up":[{"embeddable":true,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/pages\/272"}],"wp:attachment":[{"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/media?parent=271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}