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

EX Switch generates error message "Rotation of old files failed." while commiting the changes



Article ID: KB24760 KB Last Updated: 04 Mar 2017Version: 3.0
This article provides information on how to recover when the EX Switch generates an error message "Rotation of old files failed." during a commit.
The EX Switch generates the following error message during a commit:

configuration check succeeds

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

Note: This problem can occur on MX routers as well. Please refer to KB28622 if you are seeing this issue on an MX router.

Upgrading the switch to a higher Junos Software Release starting with 10.0S10.1, 10.4R1, and all later releases resolves the issue.

If an upgrade is not feasible then the following workaround can be used:


The follwoing commands are issued in the shell mode of the switch:

user@switch>start shell user root
user@switch% ls -ld db/config

ls: db/config: No such file or directory

user@switch% cd db
user@switch% ls -l

total 8

-rw-r--r-- 1 root wheel 2857 Jul 24 16:48 feature.db

user@switch% cd /var/db/
user@switch% ln -s /config/db/config . <------note the <dot> here :: ln -s /config/db/config <dot>

user@switch%ls -ld config


user@switch%ln -s /config/db/commits . <-------note the <dot> here ln -s /config/db/commits <dot>
user@switch%ls -ld

drwxr-xr-x 2 root wheel 512 Jul 24 16:49 .

user@switch%ls -ld commits

lrwxr-xr-x 1 root wheel 18 Jul 24 16:49 commits -> /config/db/commits


user@switch% ls -l

total 8

lrwxr-xr-x 1 root wheel 18 Jul 24 16:49 commits -> /config/db/commits

lrwxr-xr-x 1 root wheel 17 Jul 24 16:49 config -> /config/db/config

-rw-r--r-- 1 root wheel 2857 Jul 24 16:48 feature.db

user@switch% exit

NOTE:This issue is fixed from 10.0S10.1, 10.4R1 and all later JUNOS releases.

If none of the above works, you can try adding the following directories from the top of the directory. Meaning that you will not cd into /var/db/.

lab@re0> start shell user root
root@re0% mkdir /config/db
root@re0% mkdir /config/db/config
root@re0% exit

Should none of these solutions work. Then open a case with JTAC.

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