From f55e66fec7f66613f324af49c2216a5f186bb0a1 Mon Sep 17 00:00:00 2001 From: dodger Date: Sat, 28 Oct 2023 10:40:40 +0200 Subject: [PATCH] final revision --- intervention.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/intervention.md b/intervention.md index 1e6c68e..cdd29ae 100644 --- a/intervention.md +++ b/intervention.md @@ -54,18 +54,18 @@ I try all the options I can imagine: * Add a new shared drive on the _primary_, for example I shared `\\10.6.0.3\postgresql` using `R:\postgresql\` * Grant permissions to `network service` windows "user" * Grant permissions to `Everyone` windows group. - * Combinations of the above options + * Combinations of the above options (yes, I performed +10 combinations) Until I run out of options. -Of course when I copied the file via powershell with the Admin user, it worked. All the time. +Of course, when I copied any file via powershell with the Admin user, it worked. All the time. So I'm sure the problem comes from the user which runs PostgreSQL service, I had faced similar problems in the past. -The problem is that I'm not a windows admin, my knowledge is limited here, I tried everything I could think, but maybe a windows sysadmin will know how to solve that permission problem. +The problem is that I'm not a windows admin, my knowledge is limited here, I tried everything I could think, but maybe a windows sysadmin will know how to solve that permission problem. ## Current config -It was late for me so I decide to do a temporary solution. -What I did was creaete a local folder on both servers: +I decide to do a temporary solution to bypass the current problem of `archive_command` failing. +What I did was creaete a local folder on both servers: ``` R:\postgresql\local\archivelog ``` @@ -92,15 +92,15 @@ In my opinion, the best option will be the one I already mention, map one networ archive_command = 'copy "%p" "Z:\\archivelog\\%f"' ``` -We should investigate permissions for this solution. +We must solve the permission problem to use this solution. ### Option #2 for archiving -In the case we can't achieve the #1 solution, I suggest to keep the current configuration and perform the synchronization via _scheduled_ tasks. -So, for example, we will launch `rsync R:\postgresql\local\archivelog 10.6.x.3\R:\postgresql\archivelog` (the syntax will be wrong, I had never used `rsync` on windows...). +In the case we can't achieve the solution #1, I suggest to keep the current configuration and perform the synchronization via _scheduled_ tasks. +So, for example, we will launch `rsync R:\postgresql\local\archivelog 10.6.x.3\R:\postgresql\archivelog` (_warning_ syntax will be wrong, it's a linux command). To copy archivelogs from one server to the opposite. -Alternatives to `rsync`: +Alternatives for `rsync` on windows: * [cwRsync](https://www.itefix.net/cwrsync) * [robocopy](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy?redirectedfrom=MSDN)