This commit is contained in:
dodger 2023-10-28 10:35:19 +02:00
parent 3c572a1edf
commit 0838e6eb6e
Signed by: dodger
GPG Key ID: F6701F6CB4D1C826

View File

@ -11,7 +11,6 @@
* [Option #2 for archiving](#option-2-for-archiving)
* [Additional steps for any solution](#additional-steps-for-any-solution)
* [Archivelog folder cleanup](#archivelog-folder-cleanup)
* [old](#old)
<!-- vim-markdown-toc -->
@ -52,7 +51,7 @@ Summary: No matter which command I set on `postgresql.conf->archive_command`, po
I try all the options I can imagine:
* My prefered solution using `Z:\`
* Direct copy to `\\10.6.0.3\R$`
* Add a new shared drive on the _primary_, for example I shared `\\10.6.0.3\postgresql`
* 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
@ -124,29 +123,3 @@ R:\postgresql\archivelog
## old
I modified postgresql.conf so archivecommand is:
archive_command = 'copy "%p" "Z:\\archivelog\%f
```conf
#archive_command = 'copy "%p" "\\\\10.6.1.3\\\archivelog\\%f"' # command to use to archive a logfile segment
archive_command = 'copy "%p" "\\\\10.6.1.3\\\R\$\\postgresql\\archivelog\\%f"'
#archive_command = 'copy "%p" "Z:\\archivelog\\%f"'
#archive_command = 'copy "%p" "R:\\postgresql\\local\\archivelog\\%f"'
```
I tried many options but nothing works, it was related to windows permissions. I tried copying from the powershell with admin user and the copy from one server to the other worked.
I tried adding permissions (as much as I could remember) but nothing worked.
So At the end I decided to archive locally on "R:"
So both server are archiving into "R:\postgresql\local\archivelog"
I restarted the master instance of postgresql because of this, to apply the new setup.