database-backups

Is copying /var/lib/mysql a good alterntive to mysqldump?

Since I'm making a full backup of my entire debian system, I was thinking if having a copy of /var/lib/mysql directory is a viable alternative to dumping tables with mysqldump. are all informations needed contained in that directory? can single tables be imported in another mysql? can there be problems while restoring those files on a ...

Backup & recovery of multiple MySQL databases (InnoDB & MyISAM)

I am working on nightly and hourly backups of MySQL Databases. There are multiple MySQL databases which are either InnoDB or MyISAM (Note: Each database is either InnoDB or MyISAM for a reason). With the 2 different types I want to make sure I am grabbing everything that is needed for backup and recovery. Here is my current plan Nightly...

Taking Database backup: How to skip '/' from getdate so that it is not considered to be in a folder

I am trying to take database backup. How can I do that when getdate is being appended with file name with format dd/mm/yyyy. declare @dbName VARCHAR(100) declare @path VARCHAR(100) set @dbName='CallMeIndia' set @path='F:\'+@dbName +'-'+convert(varchar(50),getdate(),103)+'.bak' BACKUP DATABASE @dbName TO DISK= @path ...

Using sql server 2008 and TDE is it possible to create a database backup that is not encrypted?

Is it possible to take a database that is using TDE and create a backup file that is not encrypted? I know that I could create a backup, import into another database (using the key and certificate), turn off TDE and create a backup. I'm wondering if there is a more straight forward approach. ...

Loop Stored Procedure in VB.Net (win form)

Hello, I am trying to run a for loop for a backup system and inside that i want to run a SP that will loop. Below is the code that does not work for me.. Any ideas please? Dim TotalTables As Integer Dim i As Integer TotalTables = 10 For i = 1 To TotalTables objDL.BackupTables(220, i, 001) ' (This is a method from the DL and the 3 ...

SQL Server 2008 and MySQL Daily Backups

Is there a quick and easy way to backup both SQL Server 2008 and MySQL, all their databases? Right now I have a batch script that runs, but I have to manually add a database each and every time, and I'm sick of maintaining it. So I want to set it up to backup all SQL Server and then all MySQL, I dont care if its two different solutions,...

Copying data from STDOUT to a remote machine using SFTP

In order to backup large database partitions to a remote machine using SFTP, I'd like to use the databases dump command and send it directly over using SFTP to a remote location. This is useful when needing to dump large data sets when you don't have enough local disk space to create the backup file, and then copy it to a remote locatio...

How to backup my MySQL's databases on Windows Vista?

Hello. How can I backup my MySQL's databases? I'm using Windows Vista and MySQL 5.1. I have found the folder "C:\Users\All Users\MySQL\MySQL Server 5.1\data" with all my database files and copy them, but how can I restore them if I need? Thank you. ...

Move database from sql server 2008 to 2005

I have a database currently in SQL Server 2008 to be moved to SQL Server 2005. I would like to backup the 2008 db to a bak file and import it to 2005, but couldn't find any options in SSMS 2008 while taking backup. Has anyone had a similar need in the past? How did you manage this through? ...

Copying a mysql database from localhost to remote server using mysqldump.exe

I want to copy a mysql database from my local computer to a remote server. I am trying to use the mysql dump command. All the examples on the internet suggest doing something like The initial mysql> is just the prompt I get after logging in. mysql> mysqldump -u user -p pass myDBName | NewDBName.out; But when I do this I get You hav...

choose append to existing backup instead of overwrite

Hello, I have a database and I made it's first backup 2 days ago. Then yesterday I spent an entire adding new records. This morning I ran a backup, (but I selected append to existing backup set) as pictured below. I just ran a restore and I found that it wiped out all my data from yesterday and it restored it from the backup of 2 days a...

How to schedule a cron job to backup a MySql database every week?

What is a command line I can use to back up a MySql database every single week into a file name with the date (so that it doesn't collide with previous backups)? Also, is this a reasonable backup strategy? My database is relatively small (a complete export is only 3.2 megs right now). The churn rate is relatively low. I need to be ab...

What is a faster way to backup and restore a MySQL DB than mysqldump? (faster than 4 hours)

We have a database that is about 3GB (in text) after mysqldump is used to dump a text representation of it, and then mysql < mysqlstatement.sql is used to restore the database. But it takes 4 hours. Is there a way to quickly back up / restore the database instead? It is on a Mac using Ruby on Rails, so one time I set the test en...

Recreation of MySQL DB using "mysql mydb < mydb.sql" is really slow when the table has tens of millions of records. How to improve it?

It seems that a MySQL database that has a table with tens of millions of records will get a big INSERT INTO statement when the following mysqldump some_db > some_db.sql is done to back up the database. (is it 1 insert statement that handles all the records?) So when reconstructing the DB using mysql some_db < some_db.sql then the...

PHP Database Dump Script - are there any issues?

Hey everyone, I found a PHP function to dump a mySQL database that someone else had written, and then cleaned it up and formatted it a bit. I wanted to know if I could get a critique of it. I have ran it, tested it on a Wordpress blog and the DB completely restores, but wanted to get some other eyes on the code. Specifically I am looki...

Does Azure Shared Access Signature mean anyone can access my blobs?

I am writing a backup service to backup a SQL database and save it in cloud storage. I have actually implemented this already with Amazon S3 but as the application will be distributed to customers, I cannot have the API keys stored with the application. I considered using a web service to provide the keys, but it's not my best option at ...

how to schedule backup in sql server 2008 ?

how can I schedule daily backup at 9:00pm in SQL server 2008? ...

PostgreSQL Error: geometry contains non-closed rings

I am desperately trying to backup using pgAdmin III my database and I receive an error: geometry contains non-closed rings. How can I get around this?? ...

how do i check under which username a script is run?

i have this script: BACKUP DATABASE timeclockplus TO DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Backup\backup.bak' how do i know which username is executing it? the reason i ask is because i want to grant extra privelages to the current username so that instead of writing that backup folder i can write to a different ...

Backup a database using JPA (Design)

I have a working code that doesn't work always. Here's my approach: Creating the backup Create Entity Manager for source database Create Entity Manager for destination database (embedded Derby Database) Copy entities (Select all entries of a table (table order hard coded right now) and copy them to the destination database. Basically ...