Fix postgresql not being migrated during migration to binds

This commit is contained in:
inexcode 2022-08-20 22:46:39 +04:00
parent 807df0c1cc
commit cd5ae80931

View file

@ -1,6 +1,5 @@
"""Function to perform migration of app data to binds.""" """Function to perform migration of app data to binds."""
import subprocess import subprocess
import psutil
import pathlib import pathlib
import shutil import shutil
@ -263,6 +262,13 @@ def migrate_to_binds(config: BindMigrationConfig, job: Job):
group="pleroma", 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() Pleroma().start()
Jobs.update( Jobs.update(