A simple way to add a link in the admin panel sidebar to allow your client to easily take a backup of their site data using gen_dump.php
Create a template called backup.php - change written content as you wish!
This gives you a link in the sidebar - "BACK UP your DATA!" - clicking on that shows this:
Click on View:
Adapt to your needs. Any comments or suggestions welcome!
Create a template called backup.php - change written content as you wish!
- Code: Select all
<?php require_once( 'admin/cms.php' ); ?>
<cms:template title='BACK UP your DATA!' clonable='0' access_level='7' commentable='0' order='999' >
<cms:editable name='back_up_info' type='message' order='910'>
<br><br><p><strong>When you have applied updates to your site via the CMS it is a good idea <span style="color: #FD7303;">to BACK UP your data.</span></strong></p><br>
<p>Click <strong>'View'</strong> to go to the <strong>BACK UP page</strong> (it'll take less than 1 minute)!</p><br>
</cms:editable>
</cms:template>
<cms:embed 'doctype.html' />
<head>
... your bits & pieces here ...
<style type="text/css">
h1 {
color: #222;
font-size: 24px;
padding: 0;
margin: 0 0 15px 0;
}
h2 {
color: #222;
font-size: 18px;
padding: 0;
margin: 0 0 15px 0;
}
a.back-up-link {
display: block;
color: #FFF;
font-size: 20px;
background-color: #B0D1F6;
background: #FD7303;
padding: 10px;
margin: 20px 0 40px 0;
text-decoration: none;
text-align: center;
}
a.back-up-link:hover {
color: #333;
background: #FD7303;
}
</style>
</head>
<body>
<div class="container">
<main>
<div class="row">
<div class="col-sm-6">
<h1>Backup your data!</h1>
<a class="back-up-link" href="<cms:show k_admin_link/>gen_dump.php">»» CLICK HERE TO BACK UP NOW!</a>
<h2>BACK UP INSTRUCTIONS</h2>
<ul>
<li>click on the backup link above</li>
<li>a dialog box will pop up - select 'save file' (not 'open with');</li>
<li>then click OK;</li>
<li>a file called <i>install-ex.php</i> containing your database data will be saved in the default folder on your computer - most likely the 'downloads' folder;</li>
<li>if there is already an install-ex.php file from a previous back up, the newly downloaded file will be called something like install-ex(1).php, install-ex(2).php;</li>
<li>you can move the <i>install-ex.php</i> file to another folder and keep the last 2-3 back up files;</li>
</ul><br>
</div> <!-- /col -->
<div class="col-sm-offset-1 col-sm-5">
<h2>Keep copies ...</h2>
<p>Please ensure that you keep a copy of anything you upload to your site e.g. images, pdf documents.</p>
<br>
<h2>A bit of background about backing up ...</h2>
<p>A webhost will have duplicate servers and take server back ups to ensure they provide a reliable and secure service. BUT, this doesn't necessarily include taking a back up of an individual client's database(s). In the unlikely event of something going wrong with your database it could be restored via the webhost, but this would be likely to take at least 2 days and several phone calls to the help desk.</p>
<p>Far better to be self-reliant and have a back up plan of our own. We can implement our plan without delay if the worst should happen - very unlikely, but you never know!</p>
</div> <!-- /col -->
</div> <!-- /row -->
</main>
</div> <!-- /container -->
<cms:embed 'scrollup.html' />
</body>
</html>
<?php COUCH::invoke(); ?>
This gives you a link in the sidebar - "BACK UP your DATA!" - clicking on that shows this:
Click on View:
Adapt to your needs. Any comments or suggestions welcome!