User Tools

Site Tools


postgresql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
postgresql [2018/07/24 15:44]
mstraub [Incremental Backups on Localhost]
postgresql [2020/07/15 09:42] (current)
mstraub
Line 44: Line 44:
 # set a password # set a password
 \password \password
 +
 +# make an existing user superuser (or remove superuser rights)
 +sudo -u postgres psql -c "ALTER USER theuser WITH SUPERUSER;"​
 +sudo -u postgres psql -c "ALTER USER theuser WITH NOSUPERUSER;"​
  
 # create a restricted user with password (long and short version) # create a restricted user with password (long and short version)
Line 58: Line 62:
 ==== Setting a password for user postgres ==== ==== Setting a password for user postgres ====
 <code sql> <code sql>
-alter user postgres ​with password '​password';​+\password ​postgres
 </​code>​ </​code>​
  
Line 729: Line 733:
   sudo -u postgres pgbackrest --set=20180724-144511F --stanza=STANZANAME --log-level-console=detail restore   sudo -u postgres pgbackrest --set=20180724-144511F --stanza=STANZANAME --log-level-console=detail restore
  
 +You can also copy the contents of ''/​var/​lib/​pgbackrest''​ to a different device and restore it there.
  
 Log files can be found in ''/​var/​log/​pgbackrest''​. Log files can be found in ''/​var/​log/​pgbackrest''​.
postgresql.1532439866.txt.gz ยท Last modified: 2018/07/24 15:44 by mstraub