Remote Backup of Oracle and other databases and vsftp construction in Linux

Source: Internet
Author: User
Tags ftp site

On your backup machine (Windows), write a. BAT file for processing. The content is as follows:

1. Export data by user
Exp Scott/tiger file = 'd:/data1.dmp'
Exp system/system file = 'd:/data2.dmp 'owner = Scott

2. Export data by table
Exp Scott/tiger tables = (student, Dept) file = 'd:/data3.dmp'

3. Export data based on the tablespace (must be a system administrator)
Exp system/system tablespaces = (system, ODM) file = 'd:/data4.dmp'

4. Import the entire file
IMP Zhang/Zhang file = 'd:/data1.dmp 'ignore = y full = y

5. import some tables
IMP system/system file = 'd:/data1.dmp 'fromuser = Scott touser = Zhang tables = (student)

Usually: EXP system/system file = 'd:/data2.dmp 'owner = Scott

In addition, if you want to keep multiple backup files, write another. BAT file (for example, move. BAT). The content is as follows:

Move D:/1/*. dmp D:/2/*. dmp

Finally, we can use win's scheduled task to execute it.

 

In addition, you can also map files and folders on other servers, including Linux, to a local directory, and then write a copy or xcopy BAT file, you can achieve automatic backup. Of course, Linux needs to activate Sam, and a maximum of A-Z, up to 21 backups, but also worry about the ing network drive to frequent disconnection, there is a backup server every restart, you must re-enter the user name and password for the above ing.

In fact, there is an easy-to-use tool named CuteFTP in windows. As we all know, I have dug into her functions. There is a "Synchronize folder" option under her tool. With her, you can make the remote folder content consistent with your local folder content.
After that, I was worried that if the server was restarted or the FTP tool was gone, what should I do with the original policy? After testing, I found that:
1. site backup: "Tools", "Site Manager", "Export site on standard interface", a TXT file will be exported; you can also "import an FTP site" later ".
2. Backup of policies (queues): Tools, queues, and loading and saving ". You can save the scheduled synchronization queue for later loading.
Of course, the above practice requires you to install the FTP service on the remote server in advance, whether it is windows or Linux.

 

As for the establishment of FTP in Linux, I thought it was very simple. Later I checked the information for half a day and paid a lot of twists and turns, but it was still very simple.

The FTP tool in Linux is vsftp. If you choose to install the FTP server when installing RH, you have already installed vsftp. Vsftp means very secure FTP. It is very easy to start her. As long as (I have paid a lot of money) "application", "system settings", "Server Settings", "services", and then added a check mark before vsftpd, select Start.

If you are safe, do not want to log on anonymously, or use another user in Linux, create another user. When creating this user, note: log on to the shell and select "/sbin/nologin ".
If you want this user to log on to FTP without logging on to other users, you can modify the parameters in/etc/vsftpd. conf:

# Allow real users (users with accounts in the system) to access local_enable = yes # Write Permission to real users write_enable = yes # Set the mask of files uploaded by real users to 022. In this way, the file permissions uploaded by real users are 755 (rwxr-XR-x), that is, the file owner can read and write, the members of the same group can read and execute, and # other users in the system can read and execute. Local_umask = 022 # anonymous user access is allowed. The anonymous user's account in the system is ftpanonymous_enable = yes # The Mask of the File Uploaded By the anonymous user is set to 000. In this way, the object upload permission is 777 (rwxrwxrwx), that is, all users can read and write the object. Anon_umask = 000 # anonymous users can upload and create directories. The three rows are valid only when write_enable = yes is set. Anon_upload_enable = yesanon_mkdir_write_enable = yesanon_world_readable_only = No # Add the following code to grant anonymous users the permission to delete anon_other_write_enable = yes # A specific prompt is displayed in each directory. These prompts are stored in the. Message file in various directories. Dirmessage_enable = yes # When a user logs on to the FTP server, the following information is displayed no matter whether the login is successful or not. Ftpd_banner = welcome to nihao FTP service. # use logs to upload and download logs. Xferlog_enable = yes # location of the log file # xferlog_file =/var/log/vsftpd. log # use the standard FPD format xferlog_std_format = yes # The FTP service port is 20connect_from_port_20 = yes # When you use ftp to access the server, use their login directory as the directory they see in FTP, which is called chroot. # In this way, users cannot access contents other than their login directories, greatly enhancing security. The logon directory of an anonymous user is/var/FTP/chroot_list_enable = yes # the user in the file/etc/vsftpd. chroot_list does not have chroot. Chroot_list_file =/etc/vsftpd. chroot_list # At the same time, a maximum of five users can log on. Max_clients = 5 # Some do not support this option. Just comment it out. # Ftp service password verification module. Pam_service_name = vsftpd # Listen = yes # add this item (redhat9) if it runs independently ). # TCP_WRAPPERS = yes # add this item (redhat9) if it runs independently ). Set Listen = yes: indicates that vsftpd is started independently. Set max_clients = 200: specify the total number of concurrent connections on the server. Set max_per_ip = 4: specify the maximum number of connections for each client.

// Modify the main configuration file/etc/vsftpd of vsftpd. conf # vi/etc/vsftpd. conf // Delete # Before the following two rows // ① # anon_upload_enable = Yes allows anonymous users to upload // ② # anon_mkdir_write_enable = Yes enables anonymous users to write and create directories // if the preceding two settings take effect, also required: // (1) write_enable = Yes // (2) anonymous Users have write permission on the upload directory of the file system // Add the following configuration statement // anon_world_readable_only = No // The preceding configuration statement is used to open the browsing permission of anonymous users // after modification save the disk and exit VI // create an anonymous upload directory # mkdir/var/FTP/incoming # modify the upload directory permissions # chmod o + w/var/FTP/incoming /#// restart xinetd # service xinetd restart

 

 

 

Related Article

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.