pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedAutomatic backup in windows
3+ messages / 3 participants
[nested] [flat]
* Automatic backup in windows
@ 2021-08-02 06:52 obi reddy <obireddy.g1997@gmail.com>
0 siblings, 2 replies; 3+ messages in thread
From: obi reddy @ 2021-08-02 06:52 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Hello everyone, I want to schedule the automatic backup in windows
postgresql platform.
I have attached the script, if any changes is required please correct and
send back. This is my humble request.
Actually I don't know to write the windows script. Otherwise if incase any
have the script please send me .
Db name:rathi26
Backup file path:C:\Users\gangireddyobiredy\Desktop\case.sql
Thank you And Regards
Obireddy. G
@echo off
SET day=%date:~0,2%
SET month=%date:~7,8%
SET year=%date:~6,4%
SET hh=%time:~0,2%
SET mm=%time:~3,2%
SET BACKUPDIR=C:\users_Backup
SET datestr=%day%-%month%-%year%_%hh%-%mm%
SET dir=%day%-%month%-%year%
mkdir C:\users_Backup%dir%
#Provide database name here
SET db1=dbname1
echo datestr is %datestr%
SET BACKUP_rathi26=C:\Users\gangireddyobiredy\Desktop\case.sqll
SET rathi26=%db1%%datestr%.sql
ECHO Backup file name is %rathi26%
SET PGPASSWORD=
echo on
#Execute Backup for database
C:\Program Files\PostgreSQL\13\bin>pg_dump.exe -p 5432 -U postgres -v -d
rathi26 > C:\Users\gangireddyobiredy\Desktop\case.sql
echo Backup Completed
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Automatic backup in windows
@ 2021-08-02 12:42 Ron <ronljohnsonjr@gmail.com>
parent: obi reddy <obireddy.g1997@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Ron @ 2021-08-02 12:42 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
What happened when you ran that script?
On 8/2/21 1:52 AM, obi reddy wrote:
> Hello everyone, I want to schedule the automatic backup in windows
> postgresql platform.
>
> I have attached the script, if any changes is required please correct and
> send back. This is my humble request.
> Actually I don't know to write the windows script. Otherwise if incase
> any have the script please send me .
>
>
>
> Db name:rathi26
> Backup file path:C:\Users\gangireddyobiredy\Desktop\case.sql
>
>
>
> Thank you And Regards
> Obireddy. G
>
>
>
>
>
> @echo off
> SET day=%date:~0,2%
> SET month=%date:~7,8%
> SET year=%date:~6,4%
> SET hh=%time:~0,2%
> SET mm=%time:~3,2%
>
> SET BACKUPDIR=C:\users_Backup
> SET datestr=%day%-%month%-%year%_%hh%-%mm%
> SET dir=%day%-%month%-%year%
> mkdir C:\users_Backup%dir%
>
> #Provide database name here
> SET db1=dbname1
>
> echo datestr is %datestr%
>
> SET BACKUP_rathi26=C:\Users\gangireddyobiredy\Desktop\case.sqll
> SET rathi26=%db1%%datestr%.sql
>
>
> ECHO Backup file name is %rathi26%
>
> SET PGPASSWORD=
> echo on
>
> #Execute Backup for database
> C:\Program Files\PostgreSQL\13\bin>pg_dump.exe -p 5432 -U postgres -v -d
> rathi26 > C:\Users\gangireddyobiredy\Desktop\case.sql
> echo Backup Completed
--
Angular momentum makes the world go 'round.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Automatic backup in windows
@ 2021-08-02 14:00 David G. Johnston <david.g.johnston@gmail.com>
parent: obi reddy <obireddy.g1997@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: David G. Johnston @ 2021-08-02 14:00 UTC (permalink / raw)
To: obi reddy <obireddy.g1997@gmail.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
On Sunday, August 1, 2021, obi reddy <obireddy.g1997@gmail.com> wrote:
> Hello everyone, I want to schedule the automatic backup in windows
> postgresql platform.
>
> I have attached the script, if any changes is required please correct and
> send back. This is my humble request.
> Actually I don't know to write the windows script. Otherwise if incase
> any have the script please send me .
>
Then maybe you should use one of the various backup tools out there instead
of setting up your own. Don’t forget to test restoration.
David J.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2021-08-02 14:00 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02 06:52 Automatic backup in windows obi reddy <obireddy.g1997@gmail.com>
2021-08-02 12:42 ` Ron <ronljohnsonjr@gmail.com>
2021-08-02 14:00 ` David G. Johnston <david.g.johnston@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox