# Tools Manual

"Tools" is a small Module to provide Auto Tasks to clear cache-/templates_c directory, maintain Database tables and clear sessions. Also it can run simple (only Database) and full (Database with TRUST, themes und uploads-directory) Backup. All funktions can also triggered by Button-click or as Cron Job. Both with possibility to move the backup via ftp to another destination.

## Index

- Keyfeatures
- First Start
- Cron-Jobs
- Module upload
- Theme upload
- FTP-Backup
- E-Mail Notifications
- Conclusion

## Keyfeatures

- Optimizing, repairing and analyze your Database tables as Cron-Job and Auto task
- "templates_c" and/or "cache" clean-up
- Sessions clean-up
- Database-Backup and full Backup including Trust, themes and Uploads-directory from back end or via Cron-Job (additional FTP-Backup possible)
- Themes and modules can be uploaded to default destination

## First Start

### How to use Tools

The "Tools" are small helper tu trigger maintenance of your Webseite or as a little help while developing and designing ImpressCMS using following features:

- Maintain Database: This button triggers "CHECK TABLE", "REPAIR TABLE", "ANALYZE TABLE" and "OPTIMIZE TABLE" to keep your icms-tables clean and fast ;-)
- "templates_c" and "cache" clean-up: cleans each of the folders.
- "sessions" clean-up: Truncate "sessions" table.

The tools can easily be triggered by Auto Tasks. Please call in ACP: System » System Tools » Auto Tasks. There you can find a few new Auto Tasks. At least you can decide, if you like to trigger all tools at once or even some of them.

### The Backup

You have two options to trigger backups:

- Simple backup Triggers a full DB-Backup and stores this packed in a Zip-File in your Trust-directory in «modules/tools/backup/db_backup.zip»
- full backup: Triggers a full DB-Backup and stores including Trust-Path, Upload-and themes directory in a Zip-File into your Trust «modules/tools/backup/backup_sql.zip» or submit your data via FTP to another Server.

  ATTENTION: This should NOT be called from Backend, only as Cron-Job! You might run for test the backup with ftp, but it's highly recommanded to use this feature only without ftp or as Cron Job!

## Cron Jobs

Cron-Jobs werden beim Webhoster eingerichtet, um Aufgaben automatisch vom Server ausführen zu lassen. Bei Backups ist das A: sicher(er) und B: weniger Ressourcen-Lastig wie ein Backup via Auto Task. Um den Cron-Job ausführen zu können bitte beim Webhost nachschauen. In das Ziel des Cronjobs muss die Url des gewüschten Jobs eingegeben werden und die Parameter: uname=user&password=password mit angehängt. Username und password bitte mit denen eines Users ersetzen, der administrativen Zugriff auf das Tools-Modul hat

www.meine-seite.de/modules/tools/include/cron/backup.php?uname=user&password=password Führt ein Datenbank-backup OHNE die Ordner Trust und uploads aus

www.meine-seite.de/modules/tools/include/cron/full_backup.php?uname=user&password=password Führt ein Datenbank-backup MIT den Ordner Trust, themes und uploads aus

www.meine-seite.de/modules/tools/include/cron/tools.php?uname=user&password=password Führt alle Tools aus

Wenn Probleme auftreten (z.B. nicht ausgeführter Cron), kann man jeweils noch "&debug=1" aufrufen

Je nach Server/Webhost kann man auch den Cron-Job via Console/SSH ausführen. in diesem Fall bisste die parameter in der gleichen Reihenfolge übergeben. (ssh user@localhost /path/to/my/root/modules/tools/include/cron/full_backup.php -username=user -password=password -debug=1). Bitte in diesem Fall in der Config einstellen, dass die Cron-Jobs nur via SSH laufen dürfen!

Für den Fall, dass die Cron-Jobs nicht via SSH ausgeführt werden können, wird empfohlen einen Verzeichnisschutz anzulegen! Beispieldateien sind im Ordner tools/include/cron/ enthalten. Einfach an die eigenen Daten angleichen und hochladen. Nicht vergessen, die Daten im Cron Job bei dem Webhoster mit anzugeben! Die meisten Webhoster bieten an, diesen Verzeichnisschutz zu generieren. Ansonsten nutzen Sie google.de ;-)

## Upload Modules

Modul-upload can be used, to install or update Modules (update is dependent on permissions). Go to "Upload Modules/Themes". You should see an upload-Form. Is your Module-Folder not writable you'll see an error message and you need to adjust permissions first. Please use a ftp-software to take care of the permissions

To upload Modules, they need to be packed in "zip". Your Zip-File should:

- contain only the Module-folder OR
- 1 Modul zipped like /modules/modul-ordner

I will not take care of multiple modules and

Some modules contains als a new library (Folder "libraries") or something else. In this case you might not be able to use module upload!

## Upload Themes

Theme-uploads can be used, to install or update Themes. Got to Tools/"Upload Module/Themes". If you have write permissions to theme folder, you should see an upload-Form. If your Themes-Folder isn't writable you'll see an error message and you need to adjust permissions first. So please use a FTP-Software to adjust your folder permissions.

To upload Themes, they need to be packed as "zip". Your zip should:

- only the folder of your Theme OR
- 1 Theme zipped like /themes/theme-folder OR
- multiple Themes zipped like: /themes/theme-folder1, /themes/theme-folder2 etc

Please take care of the file size of your zip. Only up to 2mb are supported!

## FTP-Backup

To make use of FTP-Backup, please go to module preferences and set Enable FTP to Yes, and fill the form with FTP-URL, user and password. If your account doesn't ends in the backup folder, you can set a path, where to go for backup. Please get sure, the folder is writable!

Full and simple backups should now be moved to your FTP-Folder.

## E-Mail-Notification

You can get E-Mail reports of Tools-Backups.The module sends an E-Mail to your Admin-E-Mail, to be set in in System » Configuration » Main Preferences. To send the E-Mail you need to setup System » Configuration » Preferences » E-Mail-Setup.