Skip to content

Commit 8501b9f

Browse files
authored
update handling large database dumps (#279)
1 parent e53aa53 commit 8501b9f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

docs/maintenance/backup-recovery.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,18 @@ docker exec -it mariadb mariadb-dump -u root -p${SEATABLE_MYSQL_ROOT_PASSWORD} -
8686
!!! warning "Cronjob require other parameters"
8787

8888
If you want to execute the `docker ... mariadb-dump` command directly as a cronjob, your have to remove the parameters `-it`. Otherwise you will only create an empty dump file.
89+
Sometimes cronjob has problems with the path and `docker` is not sufficient.
8990

90-
!!! tip "Reduce database dump size"
91+
!!! tip "How to manage large database dump sizes"
9192

92-
To reduce the size of your database dump, you can exclude certain database tables that typically grow large and are not always necessary. Examples include:
93+
SeaTable stores various logs in the database, which can cause your database dump to grow significantly, especially for the tables `operation_log`, `delete_operation_log`, `session_log` and `activities`.
9394

94-
- operation_log
95-
- delete_operation_log
96-
- session_log
97-
- activities
95+
To manage this, you have two effective options:
9896

99-
To exclude these tables, use the `--ignore-table` parameter one or more times in the `mariadb-dump` command.
97+
- Use Seatable’s built-in function to regularly [clean old log entries](./database-cleanup.md), keeping your database size manageable without losing recent data.
98+
- During backups, use the `--ignore-table` parameter to split your dump into two parts: a core dump excluding large log tables, and a separate dump for the log tables.
99+
100+
This strategy reduces dump size and enables selective restoration of core data and logs as needed.
100101

101102
### Base content
102103

0 commit comments

Comments
 (0)