In linux, database backup is regularly named after time.

Source: Internet
Author: User
Tags mongodump
Bakfordatabase. shmysqldump-uuser-ppassworddatabasefolder 'date + % Y-% m-% d ~ Restore database after packaging and backing up to the file rm-

Bakfordatabase. sh mysqldump-uuser-ppassword databasefolder/'date + % Y-% m-% d ~ % H-% M-% s '. SQL backup mysql database mongodump-d database-o folder backup mongodb database cd folder tar-cf database-mongomongoy-mongom-mongod.tar database after packaging and backing up the database to the file rm-

Bakfordatabase. sh
Mysqldump-uuser-ppassword database> folder/'date "+ % Y-% m-% d ~ % H-% M-% S "'. SQL

Back up a mysql database in a specified time

Mongodump-d database-o folder' back up mongodb Databases

Cd folder

Tar-cf database-''%%y-%m-%d''.tar database'

Rm-r database 'delete the original file

Back up the mangodb database by name

00 07 *** sh folder/bakfordatabase. sh
00 */8 *** sh folder/bakfordatabase. sh

Regular backup in crontab

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.