db from disk= ' d:\7.trn '--View SELECT * from DB.DBO.T EST/* ID 1 2 3 4 5 6 7 * * Go--1.8.2 RESTORE DATABASE db from disk= ' D:\0.bak ' with replace,norecovery RESTORE LOG db from disk= ' d:\1.trn ' with NORECOVERY Restore log
cannot are used if a mongod is currently accessing the same path--directoryperdb If dbpath specified, each db are in a separate directory--journal enable Journaling-d [--DB] arg database to use-c [--collection] arg collection to use (some commands)--objcheck Validate object before inserting--filter arg filter to apply before inserting--drop Drop each collection before import--oplogreplay r
# Backup Server name
Backupserver= "Backupservername"
# shared folder name
Backupshare= "sharename"
# Access user name and password for the backup server
Backupuser= "Smbuser"
backuppw= "Smbpassword"
# define Backup Directory
Backupdir=/tmp/mysqlbackup
Date= ' Date-i '
# move the ' data to Backupserver
Smbclient//$backupserv
be escaped in SQL statements
Fields terminated by: sets the delimiter between each two fields
Fields [optionally] enclosed by 'name': packed. The optionally numeric type is not packaged. Otherwise, it is fully packaged.
Lines terminated by 'name': Line separator, that is, the characters added at the end of each record.
For example, mysql> select * into outfile '/tmp/tb1.txt'-> fields terminated ', '-> optionally enclosed by' "'-> lines terminated by'
extended stored procedure for SQL Server.
function, executes the given command string in the manner of the operating system command-line interpreter, and returns any output as a text line. Syntax: See SQL Server online Help 2:nEt use: is a network command within Windows. To connect or disconnect a computer from a shared resource, or to display information about a computer connection.
This command also controls persistent network connections.
Syntax: see net use/?
Step three: Back Up database
to the file name of the backup@dbpath nvarchar (260) = ',--restored database storage directory, unspecified SQL default data directory@retype nvarchar = ' db ',--recovery type: ' DB ' finished recovery database, ' Dbnor ' for differential recovery, log recovery for full recovery, ' DF ' differential backup recovery, '
|| Wp_usermeta || Wp_users |+-----------------------+Rows in Set (0.01 sec2. Restore the database with the source command, as long as you have access to MySQL consoleMysql> mysql> Source/server/bak/wordpress.sqlQuery OK, 0 rows Affected (0.00 sec)3. Restore the database. If you are backing up the database with the-b p
Backup | programs | recovery
adaptive Server Anywhere (ASA in this article) is a database management system that is PowerBuilder (Pb in this paper) and can be used as a database server for small application systems. And the backup/restore of the database is a basic work, can you do it in just a few minutes to complete the writing of this kind of program? This a
" command will be executed, such:
Myisamchk-o phpbb2_users.MYI
This action may take 2 ~ 3 times until no error message appears!
After repair, after restarting the MySQL service, you can use the mysql client command to Query the database content and test whether it is normal. fortunately, the database works normally at this time.
Of course, before you back up the data, it would be better to check whether the
Tags: value type in file equals system disk FOREIGN KEY constraint UID logical differenceIn the software testing, the database is the necessary knowledge, holiday busy stealing busy, organized a little study notes, and discuss together.Read CatalogueBasic knowledge
History of Database
Database nouns
SQL composition
Basic operations
Log on to database operations
Database Remote Connection operation
Database Detach operation
Database offline, online op
--Go from blog http://blog.csdn.net/abaowu/article/details/611386--the whole thinking forward and reverse--Backup ideas--Full backup mysqldump > file path--incremental backup take advantage of Linux copy mysqlbin-log files, copy those new files, then use to perform the restore operation--Recovery ideasSimilarly, you ca
conjunction with the –incremental-dir incremental backup directory. –force-non-empty-directories if it is a specific library backup restore, do not need to delete the entire MySQL directory, only the specific library and related files can be restored with this parameter will not be error. Other specific parameters can
1, full backuop, must first do:Innobackupex--defaults-file=/etc/my.cnf--user=root--password=evlink/home/mysql/backup/2, Incremental Backup, can be done every hour or three hours:Innobackupex--defaults-file=/etc/my.cnf--user=root--password=evlink--incremental/home/mysql/backup
;db.shutdownserver ()B. Delete the MONGO data file! Note that the backup exists and is OK! ~ Otherwise the helpless![Email protected] ~]# rm-rf/var/lib/mongo/*C. Extract the backed-up files to the root directory, equivalent to restore:[Email protected] ~]# tar-xvzf/root/mongodb_20150505.tar.gz-c/D. If you cannot start the service, delete the file Mongod.lock first:[Email protected] ~]# rm-f/var/lib/mongo/mo
, only valid @overexist=1
@password nvarchar (20) = '--Password for backup file (sql2000 only), if password is set at backup, this password must be supplied
As
DECLARE @sql varchar (8000)
--The restored database name
If IsNull (@dbname, ') = '
Select @sql =reverse (@bkfile)
, @sql =case when charindex ('. ', @sql) =0 then @sql
else substring (@sql, charindex ('. ', @sql) +1,1000) end
, @sql =case when char
*
To restore data from yesterday and the day before yesterday, you only need to find the corresponding update0000 * to restore the data :)
The following is a supplement:
1. MYSQL database provides a master-slave backup mechanism, which is to write all the data of the master database to the
, we can lock the data table in read-only mode and unlock it after the backup is complete. For example:
Mysql> lock tables tb1 READ, tb2 READ;Mysql> backup table tb1, tb2 TO 'backup/db ';Mysql
name from v$datafile;NAME--------------------------------------------------------------------------------+DATA/ora102/datafile/system.257.775126603SQL> shutdown immediate;
6. If this backup is not a cold backup, we need to recover the database. We need catalog including archivelog's backuppiece, restore archivelog, and then
SQL> recover database until cancel;Me
name, And the next layer is the backup file corresponding to each set.
(2) A collection in the backup database
Mongodump-h 127.0.0.1-d test-c mytest-o E: \ DB \ mongodb \ data. dmp
// Mongodump and the-c (full name: collection) parameter can be used to back up a specified set.
(3) back up the entire instance
Mongodump-h 127.0.0.1-o E: \
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.