Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[Junos Platform] Commit failure due to missing file or directory

1

0

Article ID: KB28084 KB Last Updated: 03 Jan 2014Version: 1.0
Summary:

When a file or directory is missing, users receive an error message and command commit fails. This article describes how to rebuild a missing file or directory.

Symptoms:

Users see an error message:

error: error copying files (/config/juniper.conf.3.gz->/var/db/config/juniper.conf.4.gz): No such file or directory  




Cause:

In Junos OS, there are 49 historical configuration files whose name format is juniper.conf.x.gz, where x is a value in the range 1 to 49.  Juniper.conf.1.gz, juniper.conf.2.gz, juniper.conf.3.gz, etc., are stored in the /config directory; the others are stored in the /var/db/config directory. If the directory /var/db/config or any of its files is missing, a commit failure will ensue and users will see an error message:

error: error copying files (/config/juniper.conf.3.gz->/var/db/config/juniper.conf.4.gz): No such file or directory" .  




Solution:

The solution is to re-create this directory in the shell and commit again. An example is listed below.

lab@MX1# commit
error: error copying files (/config/juniper.conf.3.gz->/var/db/config/juniper.conf.4.gz): No such file or directory
error: rotation of old files failed
[edit]
lab@MX1# run start shell

% su
Password:
root@MX1% cd /var/db

root@MX1% ls -al
total 240
drwxr-xr-x 6 root wheel 512 Aug 30 16:56 .
drwxr-xr-x 32 root wheel 1024 Aug 30 14:51 ..
drwxr-xr-x 2 root wheel 512 Aug 28 10:57 ai_cache
drwxr-xr-x 4 root wheel 512 Aug 28 10:57 appid
drwx------ 5 root wheel 512 Aug 28 10:57 certs
-rw-r--r-- 1 root wheel 116 Aug 30 16:51 commits
-rw-r--r-- 1 root wheel 71111 Aug 30 14:51 dcd.snmp_ix
-rw-r--r-- 1 root wheel 7389 Aug 30 14:51 dcd.snmp_ix.slave
-rw-r--r-- 1 root wheel 27 Aug 30 16:04 eventd_seq
-rw-r--r-- 1 root wheel 16384 Aug 30 14:51 ext_id_map.db
-rw-rw-r-- 1 root ext 6918 Aug 30 16:55 feature.db
drwxr-xr-x 7 root wheel 512 Aug 28 10:57 idpd
-rw------- 1 root wheel 0 Aug 28 11:01 login-attempts
-rw-r--r-- 1 root wheel 99 Aug 30 14:51 snmp_engine.db

root@MX1% mkdir config

root@MX1% ls -al
total 244
drwxr-xr-x 7 root wheel 512 Aug 30 16:56 .
drwxr-xr-x 32 root wheel 1024 Aug 30 14:51 ..
drwxr-xr-x 2 root wheel 512 Aug 28 10:57 ai_cache
drwxr-xr-x 4 root wheel 512 Aug 28 10:57 appid
drwx------ 5 root wheel 512 Aug 28 10:57 certs
-rw-r--r-- 1 root wheel 116 Aug 30 16:51 commits
drwxr-xr-x 2 root wheel 512 Aug 30 16:56 config
-rw-r--r-- 1 root wheel 71111 Aug 30 14:51 dcd.snmp_ix
-rw-r--r-- 1 root wheel 7389 Aug 30 14:51 dcd.snmp_ix.slavev -rw-r--r-- 1 root wheel 27 Aug 30 16:04 eventd_seq
-rw-r--r-- 1 root wheel 16384 Aug 30 14:51 ext_id_map.db
-rw-rw-r-- 1 root ext 6918 Aug 30 16:55 feature.db
drwxr-xr-x 7 root wheel 512 Aug 28 10:57 idpd
-rw------- 1 root wheel 0 Aug 28 11:01 login-attempts
-rw-r--r-- 1 root wheel 99 Aug 30 14:51 snmp_engine.db
root@MX1% exit

exit
% exit
exit

[edit]
lab@MX1# commit
commit complete

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search