Skip to content

Instantly share code, notes, and snippets.

@xianx
Last active March 3, 2018 00:04
Show Gist options
  • Save xianx/a4520bbbe7114f2b23eec899470f2cfa to your computer and use it in GitHub Desktop.
Save xianx/a4520bbbe7114f2b23eec899470f2cfa to your computer and use it in GitHub Desktop.
RSync
sudo rsync -vrazh --progress [email protected]:/backup/ /ebs/containers/percona-tdba-d/backup
#Basic syntax of rsync command
rsync options source destination
# -v : verbose
# -r : copies data recursively (but don’t preserve timestamps and permission while transferring data
# -a : archive mode, archive mode allows copying files recursively and it also preserves symbolic links, file permissions, user & group ownerships and timestamps
# -z : compress file data
# -h : human-readable, output numbers in a human-readable format
# Local to Remote Copy/Sync
rsync -vrazh --progress /path/to/source_directory/ username@remote_host:/path/to/destination_directory
# source_directory/ = will copy/sync content of source_directory to destination_directory
# Remote to Local Copy/Sync
rsync -vrazh --progress username@remote_host:/path/to/source_directory /path/to/destination_directory
sudo rsync -vrazh --progress [email protected]:/var/www/hosted/www.techtunes.com.bd/httpdocs/tTunes/app/wp-content/ /ebs/containers/php-cms/-wjajta
sudo rsync -vrazh --progress [email protected]:/var/www/hosted/www.techtunes.com.bd/httpdocs/tTunes/app/tDrive/ /ebs/containers/php-cms/ryy7ip
sudo rsync -vrazh --progress [email protected]:/var/www/hosted/www.techtunes.com.bd/httpdocs/tTunes/app/uploads/ /ebs/containers/php-cms/uot3x7
sudo tar -cjvf --exclude"cache/*" wp-content-d2c.tar.bz /ebs/containers/php-cms/-wjajta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment