How to back up your TYPO3 directories
Fortunately, the TYPO3 developers have also considered this when structuring the individual directories. The TYPO3 directory tree has been designed in such a way that both backups and updates can be carried out in just a few simple steps. In the first level of a directory tree, a TYPO3 installation usually contains the following directories
and files:
If you want to back up the current TYPO3 version in addition to the project-related files, you should back up all directories, but not all files. To keep the backup small, you can remove the files in the following directories:
For the very narrow version (project-related files only), you only need to store the following directories locally:
The “typo3temp” directory has been created since version 6 if it does not exist. The content or subdirectories can be restored under “Folder structure” in the Installtool.
At least the “.htaccess” file and, if necessary, the “robots.txt” file (up to TyYPO3-8) should be saved from the root directory, as these usually contain important settings for the web server. You can delete the rest of the files if you want to handle the TYPO-specific files separately. Otherwise, at least the files “composer.json” and “index.php” are necessary for a functioning TYPO3 installation.
If you have saved the files/database in a separate directory and cleaned it up there, you can pack it with a packing program of your choice (e.g., gzip, Winzip, or 7z), and you will always have a version of your homepage ready in case of an emergency. The more often and regularly you create a TYPO backup, the less data will be lost if the site crashes.