Skip to end of metadata
Go to start of metadata
Fedora Repository 3 Documentation
Page not found


My Fedora repository is very big and a complete rebuild would take too long. How can I back up my repository so that I don't have to rebuild it?


When performing a complete backup, several steps are involved:

  1. Copy disable-writes.xml (see below) into $FEDORA_HOME/data/fedora-xacml-policies/repository-policies/default
  2. Run $FEDORA_HOME/server/bin/ reloadpolicies https admin-user admin-pass (this immediately makes any repo-wide policy changes active without requiring a restart; change https to http if your server only supports http)
  3. Wait a few minutes to let any in-progress writes complete.
  4. Do a database+filesystem backup (see this page for the files involved)
  5. Remove disable-writes.xml
  6. Run fedora-reload-policies again

This could be scripted as part of a regular backup process. Step 3 is not perfect, however: if you wait 5 minutes but someone is in the middle of upload a multi-GB file to the repository, you might still get an inconsistent backup. You could also watch the low level system activity (thread dump, strace, lsof, etc) to see if there are any ongoing writes.

<?xml version="1.0" encoding="UTF-8"?>
<Policy xmlns="urn:oasis:names:tc:xacml:1.0:policy"
 <Description>disable writes</Description>
       <ActionMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
         <AttributeValue DataType="">urn:fedora:names:fedora:2.1:action:api-m</AttributeValue>
         <ActionAttributeDesignator DataType=""
 <Rule RuleId="1" Effect="Deny"/>
#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels