Compare commits
No commits in common. "35e44680bedb9c6033aa4d8b18fb8fb7af67c826" and "cd71ccb6cc94cef51d7c3d9a9aeff79f4165c66d" have entirely different histories.
35e44680be
...
cd71ccb6cc
@ -14,12 +14,5 @@ Mounting the new VD
|
|||||||
* create an access folder, maybe at //mnt/backup
|
* create an access folder, maybe at //mnt/backup
|
||||||
* run the mount `mount /dev/sdb1 /mnt/backup`
|
* run the mount `mount /dev/sdb1 /mnt/backup`
|
||||||
* edit fstab by adding
|
* edit fstab by adding
|
||||||
* using device name
|
|
||||||
```
|
|
||||||
//dev/sdb1 /mnt/backup ext4 defaults 1 2
|
//dev/sdb1 /mnt/backup ext4 defaults 1 2
|
||||||
```
|
|
||||||
* using UUID (do `sudo blkid` to get the UUID)
|
|
||||||
```
|
|
||||||
UUID="86e81045-a0dc-4881-8ddb-5ef25834ea5a" /datadrive xfs defaults,nofail 1 2
|
|
||||||
```
|
|
||||||
* somehow in the process an new systemctl service module is loaded based on fstab at runs at boot
|
* somehow in the process an new systemctl service module is loaded based on fstab at runs at boot
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
|
|
||||||
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get -y install postgresql
|
|
@ -1,14 +1,3 @@
|
|||||||
https://www.digitalocean.com/community/tutorials/how-to-move-a-postgresql-data-directory-to-a-new-location-on-ubuntu-18-04
|
https://www.digitalocean.com/community/tutorials/how-to-move-a-postgresql-data-directory-to-a-new-location-on-ubuntu-18-04
|
||||||
|
|
||||||
copy the data
|
|
||||||
`sudo rsync -av /var/lib/postgresql /target_dir`
|
|
||||||
|
|
||||||
rename original as a backup
|
|
||||||
`sudo mv /var/lib/postgresql/10/main /var/lib/postgresql/10/main.bak`
|
|
||||||
|
|
||||||
point postgres to the new data directory
|
|
||||||
`sudo vim //etc/postgresql/14/main/postgres.conf`
|
|
||||||
` data_directory = '/mnt/volume_nyc1_01/postgresql/10/main'`
|
|
||||||
|
|
||||||
remove the old data
|
|
||||||
`sudo rm -Rf /var/lib/postgresql/10/main.bak`
|
|
||||||
|
Loading…
Reference in New Issue
Block a user