How can I slow down a MySQL dump as to not affect current load on the server?

I have very large databases with tens of thousands of tables some of which have up to 5GB of data in 10’s of millions of entries. (I run a popular service)… I’ve always had headaches when backing up these databases. Using default mysqldump it quickly spirals the server load out of control and locks up … Read more

Cannot open backup device. Operating System error 5

Yeah I just scored this one. Look in Windows Services. Start > Administration > Services Find the Service in the list called: SQL Server (MSSQLSERVER) look for the “Log On As” column (need to add it if it doesn’t exist in the list). This is the account you need to give permissions to the directory, … Read more

Find files and tar them (with spaces)

Use this: find . -type f -print0 | tar -czvf backup.tar.gz –null -T – It will: deal with files with spaces, newlines, leading dashes, and other funniness handle an unlimited number of files won’t repeatedly overwrite your backup.tar.gz like using tar -c with xargs will do when you have a large number of files Also … Read more

How to restore to a different database in SQL Server?

You can create a new db then use the “Restore Wizard” enabling the Overwrite option or: View the contents of the backup file: RESTORE FILELISTONLY FROM DISK=’c:\your.bak’ note the logical names of the .mdf & .ldf from the results, then: RESTORE DATABASE MyTempCopy FROM DISK=’c:\your.bak’ WITH MOVE ‘LogicalNameForTheMDF’ TO ‘c:\MyTempCopy.mdf’, MOVE ‘LogicalNameForTheLDF’ TO ‘c:\MyTempCopy_log.ldf’ This … Read more