question

FAhmed-4761 avatar image
0 Votes"
FAhmed-4761 asked ·

Backup stratergy for Azure PostgreSQL

I understand by default Azure keeps backups for PostgreSQL for upto 35 days. How can i increase that? Do i need to have a custom backup strategy if i want to maintain backup for more upto 7 years? I m new to PostgreSQL so details are appreciated.

azure-database-postgresql
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@FAhmed-4761
Hopefully the below replies have helped you. If you need any help, please get back to us. Or mark the reply as an answer so the issue can close and others can get help from the same.
Thanks
Navtej S

0 Votes 0 ·
LeonLaude avatar image
1 Vote"
LeonLaude answered ·

Hi,

The automatic backups, which are part of the Azure PostgreSQL services cannot be altered as far as I know.
This means that the 35 days is the max retention available as of today.

If you want a longer retention time, I suggest you post feedback about this over at the Azure Database for PostgreSQL uservoice page over here:
https://feedback.azure.com/forums/597976-azure-database-for-postgresql



Best regards,
Leon

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

NavtejSaini-MSFT avatar image
0 Votes"
NavtejSaini-MSFT answered ·

Hi @FAhmed-4761


Yes the current maximum retention period is for 35 days as described here.


This also describes the method for the pg_dump. Although not elegant but if 7 years retention is a necessity, you can work out a strategy to keep backups using pg_dump in storage.


Hope this helps. Thanks


Navtej S


· 4 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


Looks like crontab or pgagent also cannot be installed. How do i have these scheduled?

0 Votes 0 ·

@fahmed-4761

We checked with our Internal team, You can configure crontab on your client system to run tasks like pg_dump.

Example crontab entry: https://www.postgresql.org/message-id/44DC1E52.5050802@informatyka.gdansk.pl

Hope this helps.

Thanks
Navtej S

0 Votes 0 ·

I created fileshare in Azure and tried below command, it ran successfully but i do not see the file?

pgdump Test_PG > "https://teststorageaccountutu.file.core.windows.net/testpgbackup/Test_PG_06112020.sql";

0 Votes 0 ·
Show more comments