From 6cee689c1dba37fc62aa0dd6986941bc69af44ca Mon Sep 17 00:00:00 2001 From: Junxiang Huang Date: Mon, 17 Mar 2025 14:25:24 +0800 Subject: [PATCH 1/2] opt: steps in recovering DB --- manual/setup/migrate_non_docker_to_docker.md | 25 ++++---------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/manual/setup/migrate_non_docker_to_docker.md b/manual/setup/migrate_non_docker_to_docker.md index 1dff35c8..87c9eb21 100644 --- a/manual/setup/migrate_non_docker_to_docker.md +++ b/manual/setup/migrate_non_docker_to_docker.md @@ -82,38 +82,21 @@ cp /backup/data/* /opt/seafile-data/seafile ## Recover the Database (only for the new MySQL service used in Seafile docker) -1. Add a temporary persistent directory, where the database backup files are, to the `seafile-server.yml` for service `db`: - - ```yml - services: - db: - volumes: - ... - - ":/tmp_sqls" - ... - ``` - -2. Start the database service **Only**: +1. Start the database service **Only**: ```sh docker compose up -d --no-deps db ``` -3. Enter the container and *Mariadb* environment:` +2. Follow [here](../administration/backup_recovery.md#restore-the-databases_1) to recover the database data. - ```sh - docker exec -it seafile-mysql bash - ``` - -4. Follow [here](../administration/backup_recovery.md#restore-the-databases-1) to recover the database data. Your database backup files should be in the directory `/tmp_sqls` - -5. Finally, exit the container and stop the Mariadb service +3. Exit the container and stop the Mariadb service ```sh docker compose down ``` - and remove the temporary persistent directory in `seafile-server.yml` (i.e., undo the step 1) +4. Remove the temporary persistent directory in `seafile-server.yml` (i.e., undo the step 1). ## Restart the services From 54402bea843564ac3f13516038a922165c5c3619 Mon Sep 17 00:00:00 2001 From: Junxiang Huang Date: Mon, 17 Mar 2025 17:53:53 +0800 Subject: [PATCH 2/2] opt: steps in recovering DB --- manual/setup/migrate_non_docker_to_docker.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/manual/setup/migrate_non_docker_to_docker.md b/manual/setup/migrate_non_docker_to_docker.md index 87c9eb21..c1b9033a 100644 --- a/manual/setup/migrate_non_docker_to_docker.md +++ b/manual/setup/migrate_non_docker_to_docker.md @@ -96,8 +96,6 @@ cp /backup/data/* /opt/seafile-data/seafile docker compose down ``` -4. Remove the temporary persistent directory in `seafile-server.yml` (i.e., undo the step 1). - ## Restart the services Finally, the migration is complete. You can restart the Seafile server of Docker-base by restarting the service: