xianx
10/28/2017 - 4:47 PM

RSync Command

RSync

sudo tar -cjvf --exclude"cache/*" wp-content-d2c.tar.bz /ebs/containers/php-cms/-wjajta

sudo rsync -vrazh --progress root@69.64.65.11:/var/www/hosted/www.techtunes.com.bd/httpdocs/tTunes/app/wp-content/ /ebs/containers/php-cms/-wjajta

sudo rsync -vrazh --progress root@69.64.65.11:/var/www/hosted/www.techtunes.com.bd/httpdocs/tTunes/app/tDrive/ /ebs/containers/php-cms/ryy7ip

sudo rsync -vrazh --progress root@69.64.65.11:/var/www/hosted/www.techtunes.com.bd/httpdocs/tTunes/app/uploads/ /ebs/containers/php-cms/uot3x7
#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 root@69.64.65.11:/backup/ /ebs/containers/percona-tdba-d/backup