How to restore a standalone server from a pg_basebackup using the fetch option

I am attempting to make a backup & restore of a production Postgres server (9.6 Windows) for development testing. This server is standalone and does not need to do streaming replication.

I have used

.\pg_basebackup -Ft -Z -D D:\pgbackup\default -P -U postgres -Xf --checkpoint=fast 

I am using -Xf option since the database is quite large and I want to compress it. Using the option -Xs from the standby server is too slow, and using this option on primary server requires the tablespaces to be empty.

After backup the tar files are extracted into base and each tablespace. I’ve created a recovery.conf with single entry

standby_mode = off 

However on starting postgres I get the error

2021-06-17 10:39:27.211 CAT,,,4664,,60cb0a3f.1238,1,,2021-06-17 10:39:27 CAT,,0,FATAL,XX000,"could not connect to the primary server: FATAL:  the database system is starting up 

What is the correct procedure to create a standalone backup?

Strategy on Standby restore option for hourly log shipping file

I am trying to come up with a strategy of keeping up with daily database update process using "standby" restore mode.

I am getting 24 log shipping files (for the previous day’s each hour transaction log files) from a third party’s FTP site. I would update these 24 files on a nightly run. I get these files originally in SQB file formats, and then I have a tool and script to convert these SQB files into BAK file format.

Now, I am trying to come up with a strategy of continuous back up plan.

Database does not have to be updated or modified, but just to be read. Do I restore each transactional log file as "standby" all the time and just leave them as "standby" mode?

I am planning to create a separate database to retrieve only necessary data from some tables from this "read-only" database.

I have one more question. If I accidentally run a script to restore this database as "NoRecovery or Recovery" mode, is there way to change the mode back to "Standby" by running a script or do I have to restore full bak file again as "Standby" (do the whole process again)?

Restore non-cdb backup into pdb database

I haven’t found any information on is it possible to restore a Oracle non-cdb 19.8 backup into a container-database PDB (still 19c) , or not. The method i have found is not suitable for my situation (convert non-cdb to pdb using DBMS_PDB.DESCRIBE – that seems to imply that the database type is converted + all data is copied during this operation, which is not the same as restoring from a backup). *Export/import/Golden Gate are not viable options for me.

Has anyone had a similar challenge and what was the best way to get a non-cdb to get into pdb form.

How much Hit Points does casting a two action heightened 2-nd level Heal restore?


You channel positive energy to heal the living or damage the undead. If the target is a willing living creature, you restore 1d8 Hit Points.

Two Actions (somatic, verbal) The spell has a range of 30 feet. If you’re healing a living creature, increase the Hit Points restored by 8.

Heightened (+1) The amount of healing or damage increases by 1d8, and the extra healing for the 2-action version increases by 8.

I’m reading this as a two action heightened 2-nd level Heal restoring 2d8+16 Hit Points. Am I interpreting this correctly?

Can a Wild Magic Barbarian restore a 7th(+) Level Warlock’s spell slots?

In the recently released preview of the Wild Magic Barbarian that will be in Tasha’s Cauldron of Everything (preview here), I noticed the 6th level feature ‘Bolstering Magic’. This feature has two applications. One acts as a Bless-type option, the second one reads:

Roll a d3. The creature [you’re touching] regains one expended spell slot, the level of which equals the number rolled or lower (the creature’s choice). Once a creature receives this benefit, that creature can’t receive it again until after a long rest.

Suppose this effect is used on a Warlock of level 7 or above, and for the sake of argument suppose we rolled a 3 on the d3. All of their spell slots are of spell level 4. What happens?

  • Nothing, the Warlock doesn’t have the right type of spell slot to regain
  • The Warlock has (expended) spell slots of Level 4 and higher, and now has a level 3 spell slot
  • Something else happens, namely …

Made a mistake with mysql restore on the production site instead of the staging one. Can I use mysql general log to restore?

Made a mistake with mysql restore on the production site instead of the staging one. Can I use mysql general log to restore? It seems general log is all I have. I dont seem to have a binlog with MariaDB’s Aria storage engine.

What should I do now? Anyone has any experience using general log to recover the database?

Can this Lair Action restore all the lich’s 8th or lower spell slots even when there’s no combat or any of the lich’s enemies within?

One of the Lair Actions of a lich does the following:

The lich rolls a d8 and regains a spell slot of that level or lower. If it has no spent spell slots of that level or lower, nothing happens.

A lich decided to attack the party, using some of its spell slots in the process, and then retreat to its lair to recover and await the party.

If the party manage to find the lich’s lair within 8 hours (i.e. before the lich can long rest and recover its spell slots that way), would the above Lair Action have (likely1) restored all of the lich’s spent spell slots (excluding the 9th level spell slot, obviously)?

Or is there some reason this wouldn’t work, such as the Lair Actions only being "active" when there are enemies of the lich actually in the lair (i.e. during combat)?

1 I say "likely" because there’s a dice roll involved, so technically it could not roll the numbers it needs to actually recover all its spell slots, but let’s discount that possibility as I imagine an hour or so of rolling will almost definitely roll the numbers that it needs eventually.