Line 560:
Line 560:
<div style="background-color: lightyellow; padding:10px;">
<div style="background-color: lightyellow; padding:10px;">
⚠️ '''<u>Warning!</u>''' The files present in the directory <code>C:\Program Files\MariaDB 10.4\data\dolibarr</code> are the physical files of the database. Saving these files will only allow you to reuse them with the same version of the database. A more robust way to perform a database backup is to perform an export using for example the tool '''<code>mysqldump</code>'''.
⚠️ '''<u>Warning!</u>''' The files present in the directory <code>C:\Program Files\MariaDB 10.4\data\dolibarr</code> are the physical files of the database. Saving these files will only allow you to reuse them with the same version of the database. A more robust way to perform a database backup is to perform an export using for example the tool '''<code>mysqldump</code>'''.
+
</div>
+
+
===How to save my manual installation===
+
+
In Dolibarr, three things are important to save :
+
+
*The database (MariaDB), which contains all your entries (business proposal lines, invoices, etc.).
+
*the folder <code>documents</code> which contains PDF documents generated by Dolibarr (commercial proposals, invoices, etc.) as well as uploaded ones.
+
*the configuration file <code>conf/config.php</code> that contains connection parameters to your database and other configuration information.
+
+
====Backup the database====
+
+
There are several ways to back up the database.
+
+
=====Directly from Dolibarr=====
+
+
[[File:Sauvegarde de la base de données depuis Dolibarr.png|thumb|Backup of the database from Dolibarr|none|750x750px|link=Special:FilePath/Sauvegarde_de_la_base_de_données_depuis_Dolibarr.png]]
+
+
Once connected to Dolibarr,
+
+
*Select the menu '''Backup''' in the '''Administrative Tools''',
+
*In '''Compression''', select - for simplicity - '''None''' (Windows does not include a standard utility to decompress Gzip files but you can activate it if you have for example 7-Zip, PeaZip, WinZip or WinRar).
+
*Click on '''Generate Backup'''.
+
<br />
+
[[File:Télécharger la sauvegarde de base de données.png|Download database backup|none|frame|link=Special:FilePath/Télécharger_la_sauvegarde_de_base_de_données.png]]
+
Once the backup has been generated, you can download it by clicking on the link of the file in the right section '''Existing database backup files'''.
+
+
=====Manually using the HeidiSQL graphics tool=====
+
During the installation of the Database Management System '''MariaDB''', the graphical tool HeidiSQL was also installed.
+
+
*Next to the Windows button to open the start menu, in the search box '''Type here to search''', click and type <code>heidisql</code>. In the list of options on the right, choose "'''Open'''" or click on the full title of the software to launch it ('''HeidiSQL''').
+
[[File:Démarrer HeidiSQL.png|none|thumb|501x501px|Run the '''HeidiSQL''' software|link=Special:FilePath/Démarrer_HeidiSQL.png]]
+
+
We will now define the connection to our Database Management System '''MariaDB''' using the connection information we have.
+
+
<gallery widths="750" heights="500">
+
File:Gestionnaire de sessions HeidiSQL.png|Click on '''Add'''.
+
File:Paramétrages session HeidiSQL.png|For '''User:''' put '''root''' ; for '''Password''', Enter the database administrator's password that you chose when you installed MariaDB (screen 4 of the installation wizard). In '''Data base''', click on the arrow to the right of the field and select '''dolibarr'''.
+
File:Renommer session HeidiSQL.png|Right-click on the item '''Unamed*''' then, in the pop-up menu, select '''Rename'''.
+
File:Renommer session HeidiSQL 2.png|Enter a more meaningful name for the session name. For example '''Dolibarr'''. Then, click '''Save'''. Then click '''Open'''.
+
</gallery>
+
[[File:Exporter la base de données HeidiSQL.png|none|frame|Exporting the database with HeidiSQL|link=Special:FilePath/Exporter_la_base_de_données_HeidiSQL.png]]
+
+
*Right click on the database '''<code>dolibarr</code>''' and select '''Export database to SQL...'''
+
<br />
+
+
[[File:Paramétres d'export de base de données HeidiSQL.png|none|frame|Set up the database export in '''HeidiSQL''' software|link=Special:FilePath/Paramétres_d'export_de_base_de_données_HeidiSQL.png]]
+
+
* Check the box '''Remove/DROP''' in the section '''Table(s):''' then, in '''File name:''' choose the path where you want to export the backup and the name of the file. If you followed all installation documentation, a good practice is to place export at the same place as when you realize it with Dolibarr interface (method of above paragraph): <code>C:\dolibarr\documents\admin\backup\%db-%date.sql</code> . <code>%db</code> will be replaced automatically by database name ('''<code>dolibarr</code>''') and <code>%date</code> by date and hour of export.
+
*Click on '''Export''' to launch the export.
+
<br />
+
+
=====Manually using the Windows Command Prompt=====
+
+
* Next to the Windows button to open the start menu, in the search box "'''Type here to search'''", click and type <code>mariadb</code>. In the list of options on the right, choose "'''Open'''" or click on the full title of the software to launch it ('''Command Prompt (MariaDB 10.4 (x64))''').
+
+
[[File:Démarrer Command Prompt (MariaDB 10.4 (x64)).png|none|thumb|550x550px|Start the '''Command Prompt (MariaDB 10.4 (x64))''']]
+
+
Command prompt is launched; go to directory '''Dolibarr''' database backups (in our folder <code>documents</code>) :
+
<syntaxhighlight lang="batch">
+
cd C:\dolibarr\documents\admin\backup
+
</syntaxhighlight>
+
Enter the following command to save the database where <code>dolibarr-2020-05-20-14-30.sql</code> will match the name of the exported file (you can of course put whatever you want) :
+
<syntaxhighlight lang="batch">
+
mysqldump -u root -p --opt dolibarr > dolibarr-2020-05-20-14-30.sql
+
</syntaxhighlight>
+
You will be prompted to enter the database administrator's password that you chose when you installed MariaDB (screen 4 of the installation wizard).
+
+
====Save the folder <code>documents</code> and the configuration file <code>config.php</code>====
+
+
<div style="background-color: #DFF2FF; padding:10px;">
+
ℹ️ The writing of this section is not yet complete. Please come back later.
+
</div>
+
+
=====Directly from Dolibarr=====
+
+
<div style="background-color: #DFF2FF; padding:10px;">
+
ℹ️ The writing of this section is not yet complete. Please come back later.
+
</div>
+
+
=====Manually using Windows File Explorer=====
+
+
<div style="background-color: #DFF2FF; padding:10px;">
+
ℹ️ The writing of this section is not yet complete. Please come back later.
+
</div>
+
+
====Restore a backup====
+
+
<div style="background-color: #DFF2FF; padding:10px;">
+
ℹ️ The writing of this section is not yet complete. Please come back later.
+
</div>
+
+
=====Manually using the HeidiSQL graphics tool=====
+
+
<div style="background-color: #DFF2FF; padding:10px;">
+
ℹ️ The writing of this section is not yet complete. Please come back later.
+
</div>
+
+
=====Manually using the Windows Command Prompt=====
+
+
<div style="background-color: #DFF2FF; padding:10px;">
+
ℹ️ The writing of this section is not yet complete. Please come back later.
</div>
</div>