473,591 Members | 2,899 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Backup&Restore Postgres DB

1 New Member
Hi all,

I need to backup and restore a DB.
In this particular case the data in the database is not important (strange hum...) but only the schema to put new data...

I m thinking use the pg_dump:

pg_dump -c -C -s schema > file.out

With this i have in file.out the schema, correct?

So, to restore the db from scratch, for example to a new system, what should i do?
it automatically creates all users, rolls, permissions etc?How?

What is the best way of doing it?


Many thanks
Mar 22 '10 #1
0 2211

Sign in to post your reply or Sign up for a free account.

Similar topics

3
15457
by: James | last post by:
HI, I'm looking for a script that will allow users/admins to have a one click backup solution for a MYSQL Database.. 'BACK DATABASE' button, click and its done... The a restore option, that shows all current backups, and restores the selected one with one click...
1
6230
by: Jerry T | last post by:
How can I backup and restore a MySQL DB WITHOUT USING EXEC() MYSQL MYSQLDUMP ?? If I try running exec() and mysqldump, I get Fork warning errors ..
2
3657
by: Fan of P2P | last post by:
Hi, Does anyone know how I can store files (mostly pictures) into a mySQL table? I have tried the load_file function but it seems to not work. i just get NULL as the value. Any examples would be most appreciated. I am using RH9 and the latest version of mySQL. I know I should be storing the links on disk and the save a pointer in
1
3948
by: L. Bertolini | last post by:
We're considering purchasing an application, which stores some data in the filesystem, and some data (meta data and links to files) in MS-SQL. We need to be able to create a backup wherein the database and files are "in synch" (in other words, in a consistent state). We need to maintain the "referential integrity" between database and files.
3
4688
by: 21novembre | last post by:
Hi all, I made a question several days before to describe my strange trouble of mysqldump. But I still can't figour it out. Well, I just want to ask another question whether I could just backup my databases by copying the data folder to some place? Then if I meet some disaster, could I just copy the backup folder back to recover my databases? Thank you. Zh.y
3
3490
by: Vikrant | last post by:
Friends, Due an application (old) install program problem, Under AIX I could only create DB2 instance, I could also catalog it. Its complex application and I am not expert in creating full database for this application, but I have desired DB2 backup (by db2 backup db command). Can I do redirected restore (SET TABLESPACE CONTAINERS ....) only when instance is created & cataloged , I am under the impression that redirected restore is...
7
6263
by: CCC via DBMonster.com | last post by:
We use redirected restore to refresh test from prod on different AIX 5.2 servers. The databases have the same number, size and names of cooked containers. The only difference is the fully qualified path contains a different "SID": eg. "/db2/PRD/data1/..." versus "/db2/TST/data1/...". (Please note as an SAP installation I cannot change this layout). We use "set tablespace container" statements to redefine the fully qualified container...
2
1860
by: NEXUZ6 | last post by:
Can I restore a backup taken from a DB2 7.2 on Linux to a 8.1 Win ? How ? Tkx
4
1902
by: TC | last post by:
Hello All, I apology for posting to many groups but I wasn't sure which group would be best targeted with my question. I have inherited an ASP.Net application that requires some maintenance & bug fixes. I have been asked to also download a copy of the remote SQL Server database that it uses on the background for potential maintenance and changes as well.
9
2455
by: Ananthu | last post by:
Hi I have a database named textile.I have 10 tables in it.I have used the following command to backup my database as SQL Script file, mysqldump -u sa -p textile>textile.sql The above command is successful and i have dropped my textile database. Now i have created new database with same name textile and i used the following command to restore my database,
0
7934
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7870
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8362
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7992
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
5732
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5400
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3850
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3891
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1465
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.