Howto move postgresql to another share?

17 views
Skip to first unread message

DUCARROZ Birgit

unread,
Mar 9, 2020, 7:00:03 AM3/9/20
to bareos...@googlegroups.com
Hi list,

I wonder how it is the safest way to move my database from
/var/lib/postgresql to a bigger disk

Actually my local disk /dev/sdb1 has a size of 157G and the database
consumes already 80G. In 2 months I will be out of space.

Please can you help me? I'm a total newbe with postresql

Regards,
Birgit

Spadajspadaj

unread,
Mar 9, 2020, 7:06:45 AM3/9/20
to bareos...@googlegroups.com
Every way is safe as long as you prepare for it :-)

But seriously, you have two main options

1) Do a database dump and restore to a bigger server. (the "logical
migration")

2) Stop the postgresql service, make a new filesystem on a bigger
device, move the database files there and mount the device under
/var/lib/postgresql. (the "physical migration").

I'm sure there are tons of howtos around the web since that's not
bareos-specific topic.

Of course if you move your database to a different server you'll have to
point the bareos director to the new server (update the config).

Best regards

MK

DUCARROZ Birgit

unread,
Mar 10, 2020, 4:32:44 AM3/10/20
to Spadajspadaj, bareos...@googlegroups.com
Hey, thank you a lot, I did 2) and just created a symbolic link to the
new directory, all is working fine :-D

I really thought it would be more complicated, I imagined to change
files within the bareos system, that's why I posted my question here.

Best,
Birgit
Reply all
Reply to author
Forward
0 new messages