<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — How to automatically back up database daily?]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=6123&amp;type=atom" />
	<updated>2016-02-08T18:18:12Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=6123</id>
		<entry>
			<title type="html"><![CDATA[Re: How to automatically back up database daily?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=25157#p25157" />
			<content type="html"><![CDATA[<p>Not from within FA itself, but you can have a cron job (or a &quot;scheduled task&quot; if you&#039;re on Windows) do it easily enough.</p><p>Below is what I run on a Linux server.<br /></p><div class="codebox"><pre><code>#!/bin/bash
url=&quot;http://hostname.domain.tld/&quot;
cd &quot;$(dirname &quot;$0&quot;)&quot;

curl -s -c my_session -F &#039;user_name_entry_field=backup&#039; \
                      -F &#039;password=secretpassword&#039; \
                      -F &#039;company_login_name=0&#039; ${url} &gt;/dev/null

curl -s -b my_session -F &#039;creat=Create Backup&#039; ${url}admin/backups.php \
     | hxnormalize -l 240 -x | hxselect -s &#039;\n&#039; -c &#039;#msgbox&#039; | hxselect -c div 
echo
rm my_session</code></pre></div><p>The script uses curl to log in as user &quot;backup&quot; with password &quot;secretpassword&quot; and &quot;clicks&quot; the &quot;create backup&quot; button for you. The &quot;hx&quot; stuff is there to select out the interesting parts (success/failure status messages) from the server response. Just remove that line if you don&#039;t want it.</p>]]></content>
			<author>
				<name><![CDATA[tm]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17873</uri>
			</author>
			<updated>2016-02-08T18:18:12Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=25157#p25157</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to automatically back up database daily?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=25156#p25156" />
			<content type="html"><![CDATA[<p>Hi all,</p><p>I&#039;m finding backing up of the database useful specially when everything went wrong when I tried to upgrade my version. However, it&#039;s not everyday that there is someone available to back up the database. </p><p>Is there a way to make the back up process automated daily?</p>]]></content>
			<author>
				<name><![CDATA[ocalundan]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=21011</uri>
			</author>
			<updated>2016-02-08T08:27:24Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=25156#p25156</id>
		</entry>
</feed>
