database-restore

how to restore backup mysql file in php [duplicate]

自闭症网瘾萝莉.ら 提交于 2019-12-25 08:57:36
问题 This question already has answers here : Running MySQL *.sql files in PHP (12 answers) Closed 3 years ago . I have backup successfully but now i need to restore that data in localhost j my backup drive is C:\wamp\www\my Pawning Project\backup_restore this is my restore code. <?php include '../Connection/connect.php'; $restore_data = $_GET['restore_data'];//file time $base="http://localhost/my%20Pawning%20Project/backup_restore/"; $query = "select * from backups where time='$restore_data'";

Error restoring database in Postgresql

情到浓时终转凉″ 提交于 2019-12-24 08:39:59
问题 I have taken a backup of database using pgAdmin of a postgresql DB. I am trying to restore it on to an another system using D:\OB_dependencies\DB_Backup>psql -U postgres OpenBravo < OBPOS_DB_BACKUP_23MAY_2013 Some of the tables are created, but script stops with a error ERROR: literal carriage return found in data HINT: Use "\r" to represent carriage return. CONTEXT: COPY ad_session_usage_audit, line 2355 Please suggest me a solutions for this issue. Thanks!!! 回答1: From postgreSQL mailing

SQL syntax error near gunzip when restoring a database using .sql.gz file

徘徊边缘 提交于 2019-12-20 13:01:31
问题 I am trying to restore a mysql db using a .sql.gz file. I am using mySql console to run a command because file size is too large for phpMyAdmin. Command I am using is gunzip C:/Vik/Gya/Source/beed_2013-04-06.sql.gz | mysql -u root -p bd where root is the user id. There is no password for root. bd is the database to which I am trying to import. mysql is running on my local machine (Windows 8). I have a wamp setup. This is the error I am getting: ERROR 1064 (42000): You have an error in your

Restore Database in WAMP

≯℡__Kan透↙ 提交于 2019-12-20 03:11:48
问题 I had few databases related to different projects in the WAMP. I don't know what happened, Today, when I go to PhpMyAdmin, I was just able to see the default databases and rest of my databases are not showing and even the php code related to those databases are throwing database not found errors. But when I go to "D:\wamp\bin\mysql\mysql5.1.30\data" the folders with my DB names are there. But not sure how to restore those DBs and I don't have any backup of the DB, Can any one help me how to

Django loaddata - Out of Memory

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-19 06:58:06
问题 I made a dump of my db using dumpdata and it created a 500mb json file now I am trying to use loaddata to restore the db, but seems like Django tries to load the entire file into memory before applying it and i get an out of memory error and the process is killed. Isn't there a way to bypass this problem? 回答1: loaddata is generally use for fixtures, i.e. a small number of database objects to get your system started and for tests rather than for large chunks of data. If you're hitting memory

Restoring a database from .bak file on another machine

倖福魔咒の 提交于 2019-12-18 13:12:59
问题 I've not done much SQL and am still pretty new to this, so please excuse what's probably a basic question. I've been asked to look into creating an SQL job to backup our databases, store the .baks on another machine and then to restore them to a second server. I've been doing a bit of research and playing with SSMS and have back-ed up the database to my personal machine by setting up a share and running a backup job to the share location. I'm now trying to create a new database (on the same

Import .bak file to a database in SQL server

ε祈祈猫儿з 提交于 2019-12-18 09:56:08
问题 I have a file with .bak extension. How can I import this date to a database in SQL Server? 回答1: On SQL Server Management Studio Right click Databases on left pane (Object Explorer) Click Restore Database... Choose Device , click ... , and add your .bak file Click OK , then OK again Done. 回答2: .bak files are database backups. You can restore the backup with the method below: How to: Restore a Database Backup (SQL Server Management Studio) 回答3: RESTORE FILELISTONLY FROM DISK = 'D:\3.0 Databases

SQL Server 2005 restore one schema only

亡梦爱人 提交于 2019-12-17 21:11:44
问题 I am pretty sure this isn't possible.... We have a database with several schemas. Each schema belongs to a different user. One user was asking "if I find out I made a whole load of errors would it be possible to revert to the state my data was in yesterday". Obviously we could restore the whole database, but that would restore the other schemas as well which we do not want to do.... 回答1: You are correct, it is not possible to restore a single schema only. That said, had you stored all

Exclusive access could not be obtained because the database is in use

百般思念 提交于 2019-12-17 17:46:06
问题 I'm using following code to restore databases, void Restore(string ConnectionString, string DatabaseFullPath, string backUpPath) { string sRestore = "USE [master] RESTORE DATABASE [" + DatabaseFullPath + "] FROM DISK = N'" + backUpPath + "' WITH FILE = 1, NOUNLOAD, STATS = 10"; using (SqlConnection con = new SqlConnection(ConnectionString)) { con.Open(); SqlCommand cmdBackUp = new SqlCommand(sRestore, con); cmdBackUp.ExecuteNonQuery(); } } but I receive below exception "Exclusive access could

How to Restore a old Backup from SQL Server 7 SP4 to newest SQL Server versions? [closed]

青春壹個敷衍的年華 提交于 2019-12-14 04:19:01
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I'm trying to restore an very old code of mine, in that time the database was ms access and then I upgraded to SQL Server 7 SP4, now I want to restore those old backup, but SQL Server 2014 does not allow this.. So I would like to know how can I get to restore those backup, without installing SQL Server 7 .. Thx