Line 12:
Line 12:
Dolibarr save its data in 3 different spaces. They all must be saved before each version upgrade to be sure to be able to get back its data if a problem occurs or if you want to go back on previous version. This is the 3 kind of data you need to save to be sure to loose nothing.
Dolibarr save its data in 3 different spaces. They all must be saved before each version upgrade to be sure to be able to get back its data if a problem occurs or if you want to go back on previous version. This is the 3 kind of data you need to save to be sure to loose nothing.
−
== The configuration file ==
+
== A) The database ==
−
The configuration file should not be modified by upgrade process, but it is more prudent to save it also when you do an upgrade.
−
The configuration file is called ''conf.php'' and you can find it into directory ''dolibarrdir/htdocs/conf/''.
−
Make a copy of this file into the dedicated area of your backup.
−
−
''Note'': This backup is however optional as you can still rebuild this file manually from scratch or with the Dolibarr install wizard if you know your database credentials (this file contains only parameters to connect to database and directory where you Dolibarr is installed). When making a restore, it is still possible to rebuild this file by an installation from scratch.
−
−
== The database ==
The database contains all data you have added from Dolibarr screens (except the attached/generated files that are presented in next chapter).
The database contains all data you have added from Dolibarr screens (except the attached/generated files that are presented in next chapter).
Saving the database must be done in a global way (all content). It is advised to '''save the database regularly'''. See the chapter "How" later in this document.
Saving the database must be done in a global way (all content). It is advised to '''save the database regularly'''. See the chapter "How" later in this document.
−
== Documents ==
+
== B) Documents ==
All documents related to your Dolibarr instance are saved into directory defined into your config file ''dolibarrdir/htdocs/conf/conf.php''. If you kept the choice by default during first installation, it should be something like ''dolibarrdir/documents''. This directory must be completely saved.
All documents related to your Dolibarr instance are saved into directory defined into your config file ''dolibarrdir/htdocs/conf/conf.php''. If you kept the choice by default during first installation, it should be something like ''dolibarrdir/documents''. This directory must be completely saved.
When making an upgrade, the upgrade process should not change this directory, however this directory can be read and write by web server at any time, it might be altered by a bad action or a bug. To be sure to keep all your joined files and be able to restore them if they are accidentally deleted or altered, just make a copy of all content of this directory.
When making an upgrade, the upgrade process should not change this directory, however this directory can be read and write by web server at any time, it might be altered by a bad action or a bug. To be sure to keep all your joined files and be able to restore them if they are accidentally deleted or altered, just make a copy of all content of this directory.
Line 29:
Line 22:
''Note'': copying the whole folder containing all your documents might be an heavy process, so if you can't do this regularly, at least make a backup of your database (which should be a lot smaller and would still enable you to recover most of your data, which can then be used to regenerate most of your documents).
''Note'': copying the whole folder containing all your documents might be an heavy process, so if you can't do this regularly, at least make a backup of your database (which should be a lot smaller and would still enable you to recover most of your data, which can then be used to regenerate most of your documents).
−
== Code change ==
+
== C) The configuration file ==
+
The configuration file should not be modified by upgrade process, but it is more prudent to save it also when you do an upgrade.
+
The configuration file is called ''conf.php'' and you can find it into directory ''dolibarrdir/htdocs/conf/''.
+
Make a copy of this file into the dedicated area of your backup.
+
+
''Note'': This backup is however optional as you can still rebuild this file manually from scratch or with the Dolibarr install wizard if you know your database credentials (this file contains only parameters to connect to database and directory where you Dolibarr is installed). When making a restore, it is still possible to rebuild this file by an installation from scratch.
+
+
== D) Code change ==
Finally, any custom development of modules, ie: all php files (or others) that would have been added or modified to accommodate specific needs, should also be saved. In most cases, you are not concerned by this point.
Finally, any custom development of modules, ie: all php files (or others) that would have been added or modified to accommodate specific needs, should also be saved. In most cases, you are not concerned by this point.