Fix postgresql not being migrated during migration to binds

pull/13/head
Inex Code 2022-08-20 22:46:39 +04:00
parent 807df0c1cc
commit cd5ae80931
1 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,5 @@
"""Function to perform migration of app data to binds."""
import subprocess
import psutil
import pathlib
import shutil
@ -263,6 +262,13 @@ def migrate_to_binds(config: BindMigrationConfig, job: Job):
group="pleroma",
)
move_folder(
data_path=pathlib.Path("/var/lib/postgresql"),
bind_path=pathlib.Path(f"/volumes/{config.pleroma_block_device}/postgresql"),
user="postgres",
group="postgres",
)
Pleroma().start()
Jobs.update(