database-backups

Recover database with no backups

允我心安 提交于 2019-12-12 02:05:55
问题 I want to know if there is a way to revover the state of a database at a certain date. Unfortunately I don't have a backup. 回答1: Without backups of any kind, there is nothing you can do - since previous state has been wiped away by checkpoints (even in full recovery, it acts like simple recovery until you've bothered to take a backup). This situation is precisely what backups are for. If you jump out of a plane without a parachute, don't bother looking for the ripcord... 回答2: As Aaron said

Long-term backup retention list is not available

扶醉桌前 提交于 2019-12-12 00:50:38
问题 If user is owner of the resource group and SQL server instance in it, he/she can configure LTR polices. However, when trying to list them in Available backups tab... nothing is there. Same applies to the DB restore when Long-term backup retention is selected. Is anyone aware of some role or resource access that could resolve this? p.s. Vault is not used any more. [RESOLUTION] 'SQL Server contributor' role on the subscription level resolves it. Anyway, thanks everyone. 回答1: As a workaround,

Script for MySQL backup to multiple files

假装没事ソ 提交于 2019-12-11 23:15:53
问题 I am creating a script to back up the MySQL running on a Windows 2012 server, using PowerShell. Unlike other tips found here, I want to generate a .sql file for each of the databases. This post shows how to create multiple files. I adapted it to PowerShell: Get-ChildItem -Path "$($MYSQL_HOME)\data" | cmd /C "$($MYSQL_HOME)\bin\ mysql -u -s -r $($dbuser) -p$($dbpass) -e 'databases show' '| while read dbname; cmd /C "$($MYSQL_HOME)\bin\mysqldump.exe --user = $($dbuser) --password = $($dbpass) -

Undo table updates in SQL Server 2008

早过忘川 提交于 2019-12-11 19:44:03
问题 I updated a table in my SQL Server 2008 by accident, I was updating a table from another by copying cell by cell, but I have overwritten the original table. Is there a way that I can restore my table contents as it was? 回答1: This tool says it can do it, a bit pricey though. There is a trial period, maybe that will be long enough to get your data back: http://www.apexsql.com/sql_tools_log.asp?_kk=log%20explorer&_kt=49fb8026-ca7c-4c5e-bb06-99ee95393472&gclid=CPWP48T3i6ICFY1a2godtTS7UQ 回答2: No.

Powershell : Backup-SqlDatabase -ExpirationDate

寵の児 提交于 2019-12-11 11:39:37
问题 I try to use the snap-in Backup-SqlDatabase with an expirationDate, and I get an error : invalid value for the parameter EXPIREDATE. Can someone tell me how to format this parameter ? Here's my code : $expirationDate = Get-Date $expirationDate = $expirationDate.AddDays($expirationDelayInDays) Backup-SqlDatabase -ServerInstance $serverInstance -Database $database -ConnectionTimeout 0 -BackupFile $outputFile -ExpirationDate $expirationDate 来源: https://stackoverflow.com/questions/17144781

How to backup a partitioned table in PostgresSQL 10

那年仲夏 提交于 2019-12-11 08:03:27
问题 Is it possible to make a backup of a specific partitioned table with PostgreSQL 10? When using: sudo pg_dump -Fc -f "/home/schema.backup" -t schema.partitioned_table dbname I am only getting the skeleton of the base table, without any values and without any partitions. I also couldn't find anything in the extensive documentation. 回答1: You'd have to use -t for all partitions. This is probably a consequence of the design decision to have partitions visible as individual tables on the SQL level.

How to create sharable Core Data .sqlite backups locally and in iCloud using current NSPersistentStore methods

夙愿已清 提交于 2019-12-11 07:31:56
问题 I have been having quite a time of figuring out the correct way to create a backup of a Core-Data backed .sqlite file and storing that backup, both locally and/or in iCloud (whatever the user prefers), for download, restore or sharing. Let me state up front that I am not talking about moving the persistent store to iCloud to be used by the app as its datasource. I am simply asking about creating backup files in this question. In 2014, Apple changed their default journaling mode for Core Data

How to take database backup into another PC in Sql Server 2008?

心不动则不痛 提交于 2019-12-11 06:58:35
问题 I have configured an Auto Backup option for my database, which makes database backups in regular intervals. This backup file is saved on the same Server PCs HDD (in another partition), from where I transfer (copy - paste) it into another PC (let's say, Backup PC) in the same network. Is there any option/way to configure the Auto Backup option such that it will save the Backup file into that Backup PC? I am using SQL Server 2008. Edit: I tried to create a backup plan and execute it, but

Most efficient and easiest way to back up a portion of specific tables hourly

隐身守侯 提交于 2019-12-11 06:01:04
问题 I need to create an hourly .SQB backup file of some specific tables, each filtered with a WHERE clause, from a SQL Server database. As an example, I need this data: SELECT * FROM table1 WHERE pk_id IN (2,5,7) SELECT * FROM table2 WHERE pk_id IN (2,5,7) SELECT * FROM table3 WHERE pk_id IN (2,5,7) SELECT * FROM table4 WHERE pk_id IN (2,5,7) The structure of the tables on the source database may change over time, e.g. columns may be added or removed, indexes added, etc. One option is to do some

mongodb backup role - mongodump

狂风中的少年 提交于 2019-12-10 23:55:37
问题 We have a development team that will periodically take a mongodump out of DEV and then restore it back to their local host for work. We have recently implemented authentication in mongodb and i would like to be able to allow our development team do a mongodump on one DB only so they can restore it to their local host. I have a role that inherits the backup role from Admin, but that is for our DBA to backup the whole system. My question, how do I allow for this backup role to be used by a