database-backups

View all transaction logs in SQL Server 2008

萝らか妹 提交于 2019-12-10 10:46:44
问题 The problem is this: t0: Insert is made into my database t1: Delete is executed t2: Full backup is made t3: Transaction log backup is made How can i recover the deleted record after t3 (which is now)? I want the database in a state between t0 and t1. The log level was Full. Edit: I have already run DBCC LOG(DB-Name, 3), but the log seems to be truncated. There are only 10 items although there must be thousands. 回答1: To replay log you always start from a full log, apply the differentials and

PHP Script to Backup MySQL Database

Deadly 提交于 2019-12-10 10:40:00
问题 I'm trying to write a PHP script to backup a MySQL database: if ( $db_resource = mysql_connect($db_server, $db_username, $db_password, $db_newlink) ) { if ( mysql_select_db( $db_name, $db_resource ) ) { $backupFile = $db_name."_".date( "Y-m-d-H-i-s" ).".gz"; $command = "mysqldump --opt -h ".$db_server." -u ".$db_username." -p ".$db_password." ".$db_name." | gzip > ".$db_save_dir."/".$backupFile; system( $command ); } } mysql_close( $db_resource ); When I run it from the shell terminal, I get

SQL Server Partial Database Backup (excluding some tables)

青春壹個敷衍的年華 提交于 2019-12-10 06:15:00
问题 I'm managing a reasonably large SQL Server database. Some tables contain data that are business-critical and must be backed up offsite daily. But we also have other (read-write) tables that take up about half the size of the database that aren't business-critical. What I would like to do is something like this: Primary filegroup: Tables A, B, C --> daily backup Secondary filegroup: Tables D, E, F --> monthly (or occasional manual) backup When I tried to test this, I got errors while trying to

How can I backup an Azure Cosmos DB

谁都会走 提交于 2019-12-10 03:28:38
问题 I have an Azure Cosmos DB and I need to delete all the resources from this subscription. Is there any way to take a backup offline from the portal? 回答1: You can use Data Migration Tool suggested on Automatic online backup and restore with Azure Cosmos DB article to do the same. There is no way to take a backup and import to Azure CosmosDB. The recommendation is to open a support ticket (e.g. via Azure Portal) or call Azure Support to streamline the backup/restore strategy and to request Azure

Can't import to heroku postgres database from dump

一笑奈何 提交于 2019-12-10 03:10:49
问题 Sorry if it is a duplicate, but I tried to find an answer here, and nothing helped. So I've read heroku articles like this and this. I was able to save a dump file, which I've created with pg:backups capture command. Uploaded it to s3 and tried to restore it with: heroku pg:backups restore DATABASE 'https://s3-eu-west-1.amazonaws.com/somebucket/uploads/tmp/b011.dump' But it just do not work! In console it logs: Unknown database: https://s3-eu-west-1.amazonaws.com/somebucket/uploads/tmp/b011

MSSQL DataBase Backup without a specific table

Deadly 提交于 2019-12-09 05:26:46
问题 I need to take a schedule backup without a specific table in sql. Because if I take a backup with that table it will take long time. I need to exclude one table from backup. Is it possible? Without that table all tables and data should be there in the database. 回答1: You can setup a separate file group for this one table, apart from the PRIMARY file group. This will give you the ability to create a backup that omits your large table. Below is an example that steps out the process. 1) Create a

how to schedule backup in sql server 2008? [closed]

断了今生、忘了曾经 提交于 2019-12-08 16:37:56
问题 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 10 months ago . how can I schedule daily backup at 9:00pm in SQL server 2008? 回答1: Use Microsoft SQL Server Management Studio to create a new Maintenance Plan. In the object explorer go to the folder Management > Maintenance Plans . This will open the designer. In the Toolbox you will find a task named Back Up Database Task,

Datastore export logic in Java

守給你的承諾、 提交于 2019-12-08 09:12:17
问题 Thankfully, Google announced the export logic from cloud Datastore. I would like to set up schedule-export in my platform. However, it's not Python, but Java. So I need to use cron.xml and Java logic to design this logic. Is there any reference to design Datastore export logic (cloud_datastore_admin.py) in Java? Especially, I need to transform this part in Java app = webapp2.WSGIApplication( [ ('/cloud-datastore-export', Export), ], debug=True) https://cloud.google.com/datastore/docs/schedule

Roll-forward is required following the Restore

旧巷老猫 提交于 2019-12-08 08:35:03
问题 I have three different databases for my different environments ( hsprd , hstst , hstrn ). hsprd is my production environment with live data. Every so often, a request comes through to restore production data to hstrn or hstst . I typically run this command (after stopping, then dropping the db): db2 restore db hsprd taken at 20140331180002 to /dbs into hstrn newlogpath /dbs/log/hstrn without rolling forward; When running this, I receive this message: SQL2537N Roll-forward is required

How to dump all databases with ArangoDB

久未见 提交于 2019-12-07 12:33:45
问题 I have ArangoDB running locally with databases, collections, data and graphs from several different projects in it. I'd like to back up everything so I can rebuild my system. I know how to do a backup of a single database, but because I have a bunch I'm hoping to do this in one shot. Essentially, I'm looking for the ArangoDB equivalent of mysqldump -u root -p --all-databases > alldb.sql Obviously the ArangoDB equivalent of mysql -u root -p < alldb.sql Would be good to know too. 回答1: As of