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