<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Table '#_users' isn't restored when restoring a backup]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=10120&amp;type=atom" />
	<updated>2023-02-02T02:35:51Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=10120</id>
		<entry>
			<title type="html"><![CDATA[Re: Table '#_users' isn't restored when restoring a backup]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=42020#p42020" />
			<content type="html"><![CDATA[<p>You got me curious with this so I thought I would test it.&nbsp; Besides my admin account I went ahead and set up 3 additional users. Did a backup/restore and sure enough the users didn&#039;t come over.&nbsp; I examined the sql backup file:<br />INSERT INTO `XX_users` VALUES //for some reason this doesn&#039;t work<br />(&#039;1&#039;, &#039;admin&#039;, &#039;blahblahblahblah&#039;, &#039;Administrator&#039;, &#039;2&#039;, &#039;&#039;, &#039;adm@adm.com&#039;, &#039;en_US&#039;, &#039;0&#039;, &#039;0&#039;, &#039;0&#039;, &#039;0&#039;, &#039;default&#039;, &#039;Letter&#039;, &#039;2&#039;, &#039;2&#039;, &#039;4&#039;, &#039;1&#039;, &#039;1&#039;, &#039;0&#039;, &#039;0&#039;, &#039;2023-02-02 03:12:50&#039;, &#039;10&#039;, &#039;1&#039;, &#039;1&#039;, &#039;1&#039;, &#039;1&#039;, &#039;0&#039;, &#039;orders&#039;, &#039;30&#039;, &#039;0&#039;, &#039;1&#039;, &#039;0&#039;, &#039;0&#039;, &#039;0&#039;),<br />(&#039;3&#039;, &#039;Larry&#039;, &#039;66f4b449b3a98abf87f2521e35513542&#039;, &#039;&#039;, &#039;1&#039;, &#039;&#039;, NULL, &#039;C&#039;, &#039;0&#039;, &#039;0&#039;, &#039;0&#039;, &#039;0&#039;, &#039;default&#039;, &#039;Letter&#039;, &#039;2&#039;, &#039;2&#039;, &#039;4&#039;, &#039;1&#039;, &#039;1&#039;, &#039;0&#039;, &#039;0&#039;, NULL, &#039;10&#039;, &#039;1&#039;, &#039;1&#039;, &#039;&#039;, &#039;1&#039;, &#039;0&#039;, &#039;orders&#039;, &#039;30&#039;, &#039;0&#039;, &#039;1&#039;, &#039;0&#039;, &#039;0&#039;, &#039;0&#039;),<br />(&#039;4&#039;, &#039;Moses&#039;, &#039;d41d8cd98f00b204e9800998ecf8427e&#039;, &#039;&#039;, &#039;9&#039;, &#039;&#039;, NULL, &#039;C&#039;, &#039;0&#039;, &#039;0&#039;, &#039;0&#039;, &#039;0&#039;, &#039;default&#039;, &#039;Letter&#039;, &#039;2&#039;, &#039;2&#039;, &#039;4&#039;, &#039;1&#039;, &#039;1&#039;, &#039;0&#039;, &#039;0&#039;, NULL, &#039;10&#039;, &#039;1&#039;, &#039;1&#039;, &#039;&#039;, &#039;1&#039;, &#039;0&#039;, &#039;orders&#039;, &#039;30&#039;, &#039;0&#039;, &#039;1&#039;, &#039;0&#039;, &#039;0&#039;, &#039;0&#039;),<br />(&#039;5&#039;, &#039;Curly&#039;, &#039;d8000efdcdd3ee172793aa6e73bcb8b4&#039;, &#039;&#039;, &#039;3&#039;, &#039;&#039;, NULL, &#039;C&#039;, &#039;0&#039;, &#039;0&#039;, &#039;0&#039;, &#039;0&#039;, &#039;default&#039;, &#039;Letter&#039;, &#039;2&#039;, &#039;2&#039;, &#039;4&#039;, &#039;1&#039;, &#039;1&#039;, &#039;0&#039;, &#039;0&#039;, NULL, &#039;10&#039;, &#039;1&#039;, &#039;1&#039;, &#039;&#039;, &#039;1&#039;, &#039;0&#039;, &#039;orders&#039;, &#039;30&#039;, &#039;0&#039;, &#039;1&#039;, &#039;0&#039;, &#039;0&#039;, &#039;0&#039;);</p><p>I could see no reason why this wouldn&#039;t be restored.&nbsp; So I took the exact same SQL insert statement and ran it on the database using myphpadmin and it updated the XX_Users table just fine.&nbsp; Seems to be some kind of bug.&nbsp; One thing about code, there is ALWAYS a reason.&nbsp; Not like people who maybe are just having a bad day ;-)&nbsp; &nbsp;If you have a &#039;ton&#039; of users it&#039;s easy enough to do what I did and they will restore.&nbsp; If you find the bug, let us all know.</p><p>Looks like it the protect security setting.&nbsp; Look there first perhaps. </p><p>Cheers.<br />Mac</p><p>Good luck. </p><br /><br /><div class="quotebox"><cite>advocaat.pollet wrote:</cite><blockquote><p>Hi,</p><p>As the title indicates : I wanted to restore the backup of a company but it seems that the users-table isn&#039;t restored.</p><br /><br /><p>Kind regards,</p><p>F.</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[MacKenzie]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=45867</uri>
			</author>
			<updated>2023-02-02T02:35:51Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=42020#p42020</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Table '#_users' isn't restored when restoring a backup]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=41854#p41854" />
			<content type="html"><![CDATA[<p>I can confirm that all tables are always backed up but when <strong>Protect security settings</strong> is selected, the <strong>#_users</strong> and <strong>#_security_roles</strong> tables are not restored.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2022-12-18T02:19:30Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=41854#p41854</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Table '#_users' isn't restored when restoring a backup]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=41853#p41853" />
			<content type="html"><![CDATA[<p>The last 2 posts have been <strong><a href="https://frontaccounting.com/fawiki/index.php?n=Help.BackupAndRestoreDatabase">wiki</a></strong>-ed.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2022-12-18T02:09:11Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=41853#p41853</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Table '#_users' isn't restored when restoring a backup]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=41837#p41837" />
			<content type="html"><![CDATA[<p>@apmuthu</p><p>A daily cronjob for automatic backup in the wiki should also be great :</p><p>#!/bin/bash<br />url=&quot;https://[host].[domain].[tld]/&quot;<br />cd &quot;$(dirname &quot;$1&quot;)&quot;</p><p>curl -s -c my_session -F &#039;user_name_entry_field=admin&#039; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -F &#039;password=[password for admin]&#039; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -F &#039;company_login_name=[companynumber]&#039; ${url} &gt;/dev/null</p><p>curl -s -b my_session -F &#039;creat=Create Backup&#039; ${url}admin/backups.php</p><p>echo<br />rm my_session</p>]]></content>
			<author>
				<name><![CDATA[advocaat.pollet]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=46170</uri>
			</author>
			<updated>2022-12-12T19:14:57Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=41837#p41837</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Table '#_users' isn't restored when restoring a backup]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=41836#p41836" />
			<content type="html"><![CDATA[<p>When the &#039;Protect security settings&#039; is set, the users and the security_roles tables are skipped when restoring. These are the only tables classed as security settings.</p><p>@apmuthu<br />Will you update the Wiki for us. Thank you in advance.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2022-12-12T12:42:03Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=41836#p41836</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Table '#_users' isn't restored when restoring a backup]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=41835#p41835" />
			<content type="html"><![CDATA[<p>Hi,</p><p>I think &#039;Protect security settings&#039; was enabled when restoring.</p><p>Also table #_security_roles wasn&#039;t restored.</p><p>Are there other tables that are protected when &#039;Protect security settings&#039; is enabled ?</p><p>Kind regards,</p><p>F.</p>]]></content>
			<author>
				<name><![CDATA[advocaat.pollet]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=46170</uri>
			</author>
			<updated>2022-12-12T09:54:04Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=41835#p41835</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Table '#_users' isn't restored when restoring a backup]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=41833#p41833" />
			<content type="html"><![CDATA[<p>Hi,</p><p>As the title indicates : I wanted to restore the backup of a company but it seems that the users-table isn&#039;t restored.</p><br /><br /><p>Kind regards,</p><p>F.</p>]]></content>
			<author>
				<name><![CDATA[advocaat.pollet]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=46170</uri>
			</author>
			<updated>2022-12-12T07:22:20Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=41833#p41833</id>
		</entry>
</feed>
