Linux 124 Course 12, File Archiving and system replication

Source: Internet
Author: User
Tags bz2 tar extract file transfer protocol rsync

1. Use tar to create a new compressed archive to extract files from an existing archive file
Tar Package/compress/unzip files;
C Create a new archive
X Extract Archive
T lists the contents of the archive file
V Show Details
F Display file name
P Retain permissions when extracting documents
Z compression compression is smaller with gzip
J using bzip2 compression compression larger
J using XZ compression compression ratio is very large
C Specifies the target path of the decompression
  
TAR-CVF etc.tar/etc/to package the/etc/directory
File Etc.tar
  
TAR-TF Etc.tar See what's Inside the tar package
  
TAR-XVF Etc.tar Extract Archive
TAR-XVF etc.tar-c/tmp/Extract archive specified location
  
———————————————————————————————————
  
TAR-CZVF Etc.tar.gz/etc/gzip Compressed Files
  
TAR-CJVF Etc.tar.bz2/etc/bzip2 Compressed Files
  
TAR-CJVF Etc.tar.xz/etc/xz Compressed Files
File Etc.tar.xz
  
TAR-ZXVF etc.tar.gz/etc/extract gzip Compressed files

TAR-JXVF etc.tar.bz2/etc/Decompression bzip2 compressed file

TAR-JXVF etc.tar.xz/etc/decompression xz compressed file

Unzip etc.zip (tail) br>2, copy file security or run sshd
SSH-based services for data copying between systems from a remote system
SSH [email protected]
[[email protected] ~]# SCP Roo T @server0:/root/etc.tar.xz./
[[email protected] ~]# SCP etc.tar.gz [email protected]:/root
[email    protected] ~]# scp-r etc [email protected]:/root//-r recursive replication

ssh [email protected] hostname
SSH [email protected] Poweroff//Remote Execute command

sftp SSH-based file Transfer Protocol Desktop0
SFTP Server0

Sftp> ; Get etc.tar.xz//get download file
sftp> exit
sftp> put test.file//put upload file
sftp> exit

Get [-r][ -A | -b] Remote-path Download file
put [-r][-a |-b] local-path Upload file


Winscp:linux and WindowA data transfer tool

The difference between the local file or directory of a secure synchronization and the remote replication content
Synchronization and replication:
replicates only the changed content at a time;
replication will do full content replication;

Rsync securely synchronizes file data changes and copies data
-av a All-v synchronous process
Rsync-av Source Path + Destination path
  
Rsync-av dir1/tmp
Rsync-av dir1 [email protected]/tmp
  
Use task scheduling: Back up data every once in a while

Linux 124 Course 12, File Archiving and system replication

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.