Differential backup: Back up data based on full backup. Because the tar command cannot implement differential backup, this article explains how to use the dump and restore commands. Of course, the dump and restore commands can also implement full backup and Incremental backup.
1. Create Backup directory partition mount
For the system, we can have a lot of ways to back up (restore) the system or file, the reason is to do the backup, is to be in the system or file damage, the timely recovery, reduce the loss to a minimum. Of course, the importance of backup is important for enterprise servers. Let's discuss in detail today how to use dump and restore for backup and restoration in
Basic use of dump backup and restore restore Dump is a powerful backup tool that allows you to create levels in addition to backing up the entire file system! How to understand, can be understood as MySQL differential backup, if your home/home is a separate file system, then you first import after the
In the terminal, enter:
The code is as follows
Copy Code
Tar-cvpzf/media/data/linux_bak.tgz–exclude=/proc–exclude=/lost+found–exclude=/media–exclude=/mnt–exclude=/sys/
Note: The last/previous one has a space
Media/data/linux_bak.tgz This is the path to my backup file save. Data is another partition on my hard drive, and you can back up the backup files to a network hard disk or on a tape drive.
To restore the s
"Linux instructions from beginner to proficient" in the 3rd chapter of document management, this chapter introduces many common commands, such as CP, LN, chmod, Chown, diff, Tar, MV, etc., because these are related to file management, used in daily use, so this chapter is the key chapter of this book. This section introduces you to dump (file system backup).AD:3.19 Dump (file system backup)(1) Frequency lev
Backup: DumpWhen using dump to back up a directory, the following restrictions apply:o All backup data must be under this directory (in this case:/home/someone/);O and can only use level 0, i.e. only full backup is supported;o Support-U selection, that is, the inability to establish/etc/dumpdates this individual level backup time record file;[email protected] ~]# dump [-SUVJ] [-level] [-~]#
For the system, we can have a lot of ways to back up (restore) the system or file, the reason is to do the backup, is to be in the system or file damage, the timely recovery, reduce the loss to a minimum. Of course, the importance of backup is important for enterprise servers. Let's discuss in detail today how to use dump and restore for backup and restoration in
One, the dump command:This command can be backed up for the entire file system, or only for directories. You can also specify a different backup level ( -0~-9 a total of 10 levels).Dump-w: Lists whether the partitions with the dump settings in/etc/fstab have been backed up.Command format: Dump [-SUVJ] [-level] [-f back
Redis backup and restore, with the help of a third party tool, Redis-dump
1. Installation Redis-dump
Copy Code code as follows:
[Root@localhost tank]# yum install ruby rubygems ruby-devel/installation RubyGems and related packages
[Root@localhost tank]# gem sources-a http://ruby.taobao.org///source, add Taobao, outside the source can not acces
Tags: Lin incremental backup storage log SRE file in digital package manualInstall package Yum Install-y dumpDump [option] The file name of the original file or directory after backup. Backup specified mount point (only ext2, ext3 file system supported)-level 0-9 10 backup levels, level is digital, 0 is full backup, 1 is the first incremental backup, and so on-F file name after backupAfter you have successfully backed up, log the backup time to/etc/dumpdates-V shows more output information durin
Tags: MongoDB full library backup Restore collection backupMongoDB Whole library Backup restore single table collection backup restoreCD D:\MongoDB\bin1 backup of the whole library:Mongodump-h dbhost-d Dbname-o dbdirectory-H:mongdb server address, for example:127.0.0.1:27017-D: The database instance that needs to be ba
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: \ DB \ mongodb \ data. dmp
// Mongodump if the-d parameter is not spe
Tags: chinese is select query Mon export CTI output sortThe recent need to dump some of MONGODB data to MySQL, previously only bson packets.The initial idea is to use PHP's extension bson_decode directly,Found two tricky questions,
One is the memory consumption problem, if a bson more than 2M, seems to be very laborious.
It is Chinese although appeared, but there will be a lot of special symbo
Reference Official Documentation: MongoDB Backup MethodsA backup restore was made using a snapshot of the operating system, and the restore did not succeed after the backup was successful (refer to: Backup and restore with Filesystem snapshots)So this method is not recorded here first.Current Test below? Method of Back
)--journal enable journaling (relevant only ifDBPath specified)-d [--DB] arg database to use-c [--collection] arg collection to use (some commands)-O [--out] arg (=dump) output directory or "-" for stdout-Q [--query] arg JSON query--oplog use Oplog for Point-in-timeSnapshotting--repair try to recover a crashed database--forcetablescan Force a table scan$snapshot)Export Database[Email protected] ~]# mongodump-h 127.0.0.1--port 30216-d test-uxxxx-pxxxxx
: 192.168.1.108 Tue Dec 3 06:11:41.618 DATABASE: tank to /home/zhangy/mongodb/tank Tue Dec 3 06:11:41.623 tank.system.indexes to /home/zhangy/mongodb/tank/system.indexes.bson Tue Dec 3 06:11:41.623 2 objects Tue Dec 3 06:11:41.623 tank.contact to /home/zhangy/mongodb/tank/contact.bson Tue Dec 3 06:11:41.669 2 objects Tue Dec 3 06:11:41.670 Metadata for tank.
db was in a Separat E directory--journal enable journaling-d [--DB] arg database to use-c [--collection] ar G Collection to use (some COMmands)-o [--out] arg (=dump) output directory or "-" for Stdout-q [--query] arg JSON query--oplog use Oplog for Point-in-time snapshotting--repair try to recover a crashed database--forcetablescan force a TA
BLE scan (do not use $snapshot) Full library Restore: mongo
relatively simple, and we introduce the second scenario, which takes the form of a command
To facilitate testing, we first delete the database
Entering commands in the MongoDB shell
installed, would zero-out data files
MongoDB shell version:3.0.4
connecting to:test
> Use Runoob
swit Ched to DB Runoob
>
> Db.collections
runoob.collections
> Show Collections
col
Flatjson
Leveljson
postcollection
posts
runoob
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.