changeset 1709:6378d261136e

rm postgres backups
author Vadim Filimonov <fffilimonov@yandex.ru>
date Tue, 05 Jul 2022 13:37:05 +0300
parents 8d257d56dc42
children fc224a1bb6ea
files host/doc/backup.txt host/macos/addStartupScriptsPostgres.sh host/macos/postgres/luanhost.postgresql.plist host/macos/startupScripts.sh host/startup/postgres/pg_hba.conf host/startup/postgres/pg_hba.conf.slave host/startup/postgres/postgresql.conf host/startup/postgres/postgresql.conf.slave
diffstat 8 files changed, 0 insertions(+), 129 deletions(-) [+]
line wrap: on
line diff
--- a/host/doc/backup.txt	Mon Jul 04 14:06:59 2022 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-s1.luan.software - master db
-test.luan.software - slave db
-
-install:
-
-brew tap caskroom/versions
-brew install postgresql@9.5
-
-cd macos
-./addStartupScriptsPostgres.sh slave_ip
-
-create replica
-
-1) mkdir /Users/administrator/replica/s1 (must be empty)
-
-2) pg_basebackup -h s1.luan.software -D /Users/administrator/replica/s1 -R -P -U administrator --xlog-method=stream
-
-replace configs with files *.slave from startup/postgres
--- a/host/macos/addStartupScriptsPostgres.sh	Mon Jul 04 14:06:59 2022 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-#!/bin/bash
-
-SLAVE_IP=$1;
-
-if [ "$1" == "" ]; then
-  SLAVE_IP="127.0.0.1";
-fi;
-
-. startupScripts.sh;
-mkdir -p $localStartup"/postgres" 2>/dev/null;
-
-cd $startupPostgres;
-for file in *.plist; do
-    log=${ROOTPWD}"/logs/startup.${file}.log";
-	sed "s~PWD~${startup}~g;\
-	     s~LOG~${log}~g;\
-	     s~USER~${user}~g;\
-	     s~ROOT~${ROOTPWD}~g" $file > ${localStartup}/${file};
-done;
-
-cd $ROOTPWD/startup/postgres;
-
-cp postgresql.conf ${localStartup}/postgres/postgresql.conf;
-mv /usr/local/var/postgresql@9.5/postgresql.conf /usr/local/var/postgresql@9.5/postgresql.conf.bak;
-ln -sf ${localStartup}/postgres/postgresql.conf /usr/local/var/postgresql@9.5/postgresql.conf;
-
-sed "s/SLAVE_IP/${SLAVE_IP}/g" pg_hba.conf > ${localStartup}/postgres/pg_hba.conf;
-mv /usr/local/var/postgresql@9.5/pg_hba.conf /usr/local/var/postgresql@9.5/pg_hba.conf.bak;
-ln -sf ${localStartup}/postgres/pg_hba.conf /usr/local/var/postgresql@9.5/pg_hba.conf;
-
-addStartup;
-
-cd $ROOTPWD;
--- a/host/macos/postgres/luanhost.postgresql.plist	Mon Jul 04 14:06:59 2022 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-    <dict>
-        <key>KeepAlive</key>
-        <true/>
-        <key>Label</key>
-        <string>luanhost.postgresql</string>
-        <key>ProgramArguments</key>
-        <array>
-            <string>/usr/local/opt/postgresql@9.5/bin/postgres</string>
-            <string>-D</string>
-            <string>/usr/local/var/postgresql@9.5</string>
-        </array>
-        <key>RunAtLoad</key>
-        <true/>
-        <key>WorkingDirectory</key>
-        <string>/usr/local</string>
-        <key>UserName</key>
-        <string>USER</string>
-        <key>StandardErrorPath</key>
-        <string>LOG</string>
-        <key>StandardOutPath</key>
-        <string>LOG</string>
-    </dict>
-</plist>
\ No newline at end of file
--- a/host/macos/startupScripts.sh	Mon Jul 04 14:06:59 2022 -0600
+++ b/host/macos/startupScripts.sh	Tue Jul 05 13:37:05 2022 +0300
@@ -7,7 +7,6 @@
 systemStarup='/Library/LaunchDaemons';
 localStartup=${ROOTPWD}'/local/startup';
 startup=${ROOTPWD}'/macos';
-startupPostgres=${ROOTPWD}'/macos/postgres';
 
 function addStartup() {
   cd $localStartup;
--- a/host/startup/postgres/pg_hba.conf	Mon Jul 04 14:06:59 2022 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-local   all             all                                     trust
-host    all             all             127.0.0.1/32            trust
-host    all             all             ::1/128                 trust
-
-host	replication	administrator         SLAVE_IP/32      trust
-
--- a/host/startup/postgres/pg_hba.conf.slave	Mon Jul 04 14:06:59 2022 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-local   all             all                                     trust
-host    all             all             127.0.0.1/32            trust
-host    all             all             ::1/128                 trust
-
-local   replication     administrator                                trust
-host    replication     administrator        127.0.0.1/32            trust
-host    replication     administrator        ::1/128                 trust
--- a/host/startup/postgres/postgresql.conf	Mon Jul 04 14:06:59 2022 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-listen_addresses = '*'
-log_timezone = 'US/Central'
-datestyle = 'iso, mdy'
-timezone = 'US/Central'
-lc_messages = 'en_US.UTF-8'
-lc_monetary = 'en_US.UTF-8'
-lc_numeric = 'en_US.UTF-8'
-lc_time = 'en_US.UTF-8'
-default_text_search_config = 'pg_catalog.english'
-shared_buffers = 4096MB
-temp_buffers = 256MB
-work_mem = 256MB
-maintenance_work_mem = 256MB
-max_stack_depth = 7680kB
-effective_cache_size = 8192MB
-wal_level = hot_standby
-max_wal_senders = 2
-wal_keep_segments = 128
-max_locks_per_transaction = 5000
\ No newline at end of file
--- a/host/startup/postgres/postgresql.conf.slave	Mon Jul 04 14:06:59 2022 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-log_timezone = 'US/Central'
-datestyle = 'iso, mdy'
-timezone = 'US/Central'
-lc_messages = 'en_US.UTF-8'
-lc_monetary = 'en_US.UTF-8'
-lc_numeric = 'en_US.UTF-8'
-lc_time = 'en_US.UTF-8'
-default_text_search_config = 'pg_catalog.english'
-shared_buffers = 4096MB
-temp_buffers = 256MB
-work_mem = 256MB
-maintenance_work_mem = 256MB
-max_stack_depth = 7680kB
-effective_cache_size = 8192MB
-wal_level = hot_standby
-max_wal_senders = 2
-wal_keep_segments = 128
-max_locks_per_transaction = 5000
-hot_standby = on