Backup data server

islam bahaz3 years ago

Hello
How can i download the data backup of my server if i want to install new server

Anton Tananaev3 years ago

What database are you using? Just use standard backup/restore functionality for your database engine.

islam bahaz3 years ago

Iam using windows server and i want to backup list of my users and devices and history of 1 month

BerndFfm3 years ago

Backup for Windows Server with MariaDB :

"C:\Program Files\MariaDB 10.4\bin\mysqldump.exe" -P3306 -hlocalhost -uroot -pxxx traccar --allow-keywords --add-drop-table --complete-insert --quote-names > D:\Backup\Traccar_Backup.sql

xxx = Passwort

Or use HeidiSQL oder Phpmyadmin.

Greetings Bernd

Anton Tananaev3 years ago

If you are using default H2 database, you can just backup files in data folder directly. Note that we don't recommend H2 database usage in production.

islam bahaz3 years ago

The file database is big is mor than 2 GB
I want to limite the history to 1 month to keep the file database small
Can i do this ??

Anton Tananaev3 years ago

You can, but that's more complicated. You'd have to connect to the database and query a portion of the data.

islam bahaz3 years ago

Can you tell me haw do this or there is not a video explique this opération please

Anton Tananaev3 years ago

There's no step by step guide, if that's what you are looking for. Again, we don't recommend using H2 database for production, so it doesn't make any sense for us to prepare any documentation for it.

BerndFfm3 years ago

Start HeidiSQL und start the command :

DELETE FROM tc_positions WHERE servertime < CURRENT_DATE - INTERVAL 1 MONTH

Greetings Bernd

islam bahaz3 years ago

I have H2 database can i connect to database frome HeidiSQL ?