0

i am creating a web application in asp.net with database on postgres. i have successfuly created a database backup by putting the destination of database backup on the webconfig file. the web application succesfully creates backups when published on windows server, however i was wondering if the server is changed to linux the destination folder would be invalid.what could be the solution for it to work on different OS??

another problem is that the postgres installation could be on any drive in linux whereas rightnow in my webapplication i open the system diagnostics to run the pgdump command using the info.filename="C:\Program Files\PostgreSQL\9.3\bin\" + commandType + ".exe ";

anyone has solution for multiOS database backup for postgres using asp.net?? is there any solution to this??

3
  • How are you running asp.net on Linux anyway? Commented Jan 29, 2014 at 14:59
  • i have successfuly deployed the application in windows server,however i am thinking what would happen if the server goes to linux check this link everest.planetearthsolution.com/File/BackupCompany.aspx.. Commented Jan 29, 2014 at 16:05
  • What makes you think asp.net runs on Linux? Commented Jan 29, 2014 at 17:50

1 Answer 1

1

You can continue to use your backup scripts on Windows. pg_dump will happily connect to the remote database on the Linux box. E.g.

pg_dump -h my_linux_server ....

I strongly suggest reading the PostgreSQL docs on backup/restore. Consider setting up PITR in addition to periodic dumps. I'd recommend running PgBarman on the Linux server (archiving to an external drive, NAS, or network share) for point-in-time recovery, plus periodic dumps to the Linux box.

See: http://www.postgresql.org/docs/current/static/backup.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.