]> source.dussan.org Git - archiva.git/blob
0be50547398a5c94052a46138945bf340b2ca41b
[archiva.git] /
1 <%--
2   ~
3   ~ Licensed under the Apache License, Version 2.0 (the "License");
4   ~ you may not use this file except in compliance with the License.
5   ~ You may obtain a copy of the License at
6   ~
7   ~      http://www.apache.org/licenses/LICENSE-2.0
8   ~
9   ~ Unless required by applicable law or agreed to in writing, software
10   ~ distributed under the License is distributed on an "AS IS" BASIS,
11   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   ~ See the License for the specific language governing permissions and
13   ~ limitations under the License.
14   --%>
15 <%@ taglib uri="/struts-tags" prefix="s"%>
16 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
17 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
18
19 <html>
20 <s:i18n name="org.apache.archiva.redback.struts2.default">
21   <head>
22     <title><s:text name="backupRestore.page.title"/></title>
23   </head>
24   <body>
25     <div id="h3">
26       <h3><s:text name="backupRestore.section.backup.title"/></h3>
27
28       <c:if test="${!empty actionErrors}">
29         <div class="errormessage">
30           <s:iterator value="actionErrors">
31             <p><s:text name="<s:property/>" /></p>
32           </s:iterator>          
33         </div>
34       </c:if>
35
36       <p>
37         You can back up the application data for this installation to prevent data loss in the case of system failures. 
38         The  application will be inaccessible while the backup takes place.
39       </p>
40       <p>
41         A backup will be stored on the server in a dated subdirectory of the backup directory: 
42         <code> 
43           <s:property value="backupDirectory" /> 
44         </code> 
45       </p>
46
47       <s:form action="backup" method="post" >
48         <s:submit value="Create Backup" theme="simple"/>
49       </s:form>  
50     </div>
51  
52     <div id="h3">  
53       <h3><s:text name="backupRestore.section.restore.title"/></h3>
54       <p>
55         You can reset the system to a previous state by using the
56         restore function, or use it to import data from another version of this application.
57       </p>
58       <p>
59         You can specify the directory where the backup files are located, or select from one of the recent backups in the configured
60         backup directory.
61       </p>
62
63       <s:form action="restore" method="post" validate="true">
64         <table>
65           <s:textfield name="restoreDirectory" label="Backup directory"
66             size="70" required="true" />
67           <s:submit value="Restore Backup" theme="simple" />
68         </table>         
69       </s:form>
70     </div>
71     
72     <div id="h3">
73       <h4><s:text name="backupRestore.section.recent.backup"/></h4>
74
75       <s:set name="previousBackups" value="previousBackups" /> 
76       <c:choose>
77         <c:when test="${empty(previousBackups)}">
78           <div class="warningmessage">
79             No previous backups found in the default backup directory.
80           </div>
81         </c:when>
82         <c:otherwise>
83           <table>
84             <c:forEach var="backup" items="${previousBackups}">
85               <tr>
86                 <td>
87                   <fmt:formatDate value="${backup.date}" pattern="EEE MMM dd, yyyy 'at' HH:mm:ss" />
88                 </td>
89                 <td>
90                   <c:if test="${backup.userDatabase}">
91                     <c:set var="url">
92                       <s:url action="restore">
93                         <s:param name="restoreDirectory">${backup.directory}</s:param>
94                         <s:param name="userDatabase" value="true" />
95                       </s:url>
96                     </c:set>
97                     <a href="${url}">Restore Users</a>
98                   </c:if>                                         
99                   </td>
100                 </tr>
101               </c:forEach>
102             </table>
103           </c:otherwise>
104         </c:choose>
105       </div>
106   </body>
107 </s:i18n>
108 </html>
109