SlideShare a Scribd company logo
Gaurav Mishra
<gmishx@gmail.com>
Linux - 9
Backup using rsync
Unrestricted
01-03-2018
Gaurav Mishra <gmishx@gmail.com>
rsync
• rsync is a software in Linux
environment use to make disk
backups.
• Backups can be either local or on
remote machine.
• The uniqueness of rsync is that it
performs differential
synchronizations.
• Both the systems must have rsync
installed.
• rsync can use ssh secure connections
for transmissions.
01-03-2018
Gaurav Mishra <gmishx@gmail.com>
Using rsync
• Install rsync on remote and local machine
▫ sudo apt-get install rsync
• Creating archive on remote host
▫ Archive mode include recursive copy, sym links, permissions, time, group, owner
and device files.
 rsync -r -a -v ~/proj user@host:~/backups/
• Specifying remote shell
▫ Additional information for the remote shell used to setup connection can be set
using -e flag
▫ Setting the ssh port during transfer
 rsync -rav -e ‘ssh -p 2257’ ~/proj user@host:~/backups/
• Filtering files
▫ rsync can filter files to be copied using filter rules
▫ Filtering ‘.o’ files
 rsync -rav --exclude=“*.o” ~/proj user@host:~/backups/
01-03-2018
Gaurav Mishra <gmishx@gmail.com>
Using rsync
• Performing compression on transmission
▫ rsync can compress the transmission to save bandwidth
 rsync -z -r ~/project user@host:~/backups/
• Updating a backup
▫ Using update options, rsync will not transfer files which are new in the destination
 rsync -av <-u/--update> ~/project user@host:~/repository/
• Deleting old files
▫ rsync support delete option which removes files from the destination which are
not in the source
▫ To use this option, whole directory must be synchronized
 rsync -a --delete ~/project user@host:~/repository/
01-03-2018

More Related Content

PDF
試して覚えるPacemaker入門 『リソース設定編』
PPTX
Introduction to Redis
PDF
VirtualBox と Rocky Linux 8 で始める Pacemaker ~ VirtualBox でも STONITH 機能が試せる! Vi...
PPTX
(Re)Indexing Large Repositories in Alfresco
PDF
Pacemakerを使いこなそう
PPTX
Docker Networking with New Ipvlan and Macvlan Drivers
PPTX
OpenStack HA
PDF
Jenkins vs GitLab CI
試して覚えるPacemaker入門 『リソース設定編』
Introduction to Redis
VirtualBox と Rocky Linux 8 で始める Pacemaker ~ VirtualBox でも STONITH 機能が試せる! Vi...
(Re)Indexing Large Repositories in Alfresco
Pacemakerを使いこなそう
Docker Networking with New Ipvlan and Macvlan Drivers
OpenStack HA
Jenkins vs GitLab CI

What's hot (20)

PDF
Apache Arrow
PPTX
PDF
systemd 再入門
DOCX
Advanced file permissions in linux
PDF
その ionice、ほんとに効いてますか?
PDF
Beautiful Monitoring With Grafana and InfluxDB
PDF
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
PDF
GitOps - Operation By Pull Request
PDF
Hadoop Architecture and HDFS
PPTX
Access control list acl - permissions in linux
PDF
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
PDF
Prometheus + Grafana = Awesome Monitoring
PDF
Introduction to Redis
PPTX
トランザクションの設計と進化
PPTX
Linux security
PDF
How Netflix Tunes EC2 Instances for Performance
PDF
macvlan and ipvlan
PDF
OSvの概要と実装
PDF
Tuning TCP and NGINX on EC2
PDF
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0
Apache Arrow
systemd 再入門
Advanced file permissions in linux
その ionice、ほんとに効いてますか?
Beautiful Monitoring With Grafana and InfluxDB
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
GitOps - Operation By Pull Request
Hadoop Architecture and HDFS
Access control list acl - permissions in linux
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Prometheus + Grafana = Awesome Monitoring
Introduction to Redis
トランザクションの設計と進化
Linux security
How Netflix Tunes EC2 Instances for Performance
macvlan and ipvlan
OSvの概要と実装
Tuning TCP and NGINX on EC2
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0
Ad

Similar to Backup using rsync (6)

PDF
OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...
PDF
Backup UUASC 9/6/12
ODP
How we setup Rsync-powered Incremental Backups
ODP
Barcamp Gent 2: rsnapshot
PDF
I am in need of two separate files that I can save independently.pdf
PDF
A Backup Approach For Ubuntu Linux
OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...
Backup UUASC 9/6/12
How we setup Rsync-powered Incremental Backups
Barcamp Gent 2: rsnapshot
I am in need of two separate files that I can save independently.pdf
A Backup Approach For Ubuntu Linux
Ad

More from Gaurav Mishra (11)

PPTX
FOSSology and OSS-Tools for License Compliance and Automation
PPTX
FOSSology & GSOC Journey
PPTX
Block Chain - Merkel and Key exchange
PPTX
Block Chain - Introduction
PPTX
Disk quota and sysd procd
PPTX
Linux User Management
PPTX
Apache, cron and proxy
PPTX
Linux Run Level
PPTX
Firewall and IPtables
PPTX
Linux securities
PPTX
wget, curl and scp
FOSSology and OSS-Tools for License Compliance and Automation
FOSSology & GSOC Journey
Block Chain - Merkel and Key exchange
Block Chain - Introduction
Disk quota and sysd procd
Linux User Management
Apache, cron and proxy
Linux Run Level
Firewall and IPtables
Linux securities
wget, curl and scp

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Cloud computing and distributed systems.
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
Machine learning based COVID-19 study performance prediction
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Electronic commerce courselecture one. Pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Machine Learning_overview_presentation.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Cloud computing and distributed systems.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
A Presentation on Artificial Intelligence
Machine learning based COVID-19 study performance prediction
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Mobile App Security Testing_ A Comprehensive Guide.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Electronic commerce courselecture one. Pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
MIND Revenue Release Quarter 2 2025 Press Release
20250228 LYD VKU AI Blended-Learning.pptx
Programs and apps: productivity, graphics, security and other tools
Chapter 3 Spatial Domain Image Processing.pdf
Spectroscopy.pptx food analysis technology
Machine Learning_overview_presentation.pptx
Advanced methodologies resolving dimensionality complications for autism neur...

Backup using rsync

  • 1. Gaurav Mishra <gmishx@gmail.com> Linux - 9 Backup using rsync Unrestricted 01-03-2018
  • 2. Gaurav Mishra <gmishx@gmail.com> rsync • rsync is a software in Linux environment use to make disk backups. • Backups can be either local or on remote machine. • The uniqueness of rsync is that it performs differential synchronizations. • Both the systems must have rsync installed. • rsync can use ssh secure connections for transmissions. 01-03-2018
  • 3. Gaurav Mishra <gmishx@gmail.com> Using rsync • Install rsync on remote and local machine ▫ sudo apt-get install rsync • Creating archive on remote host ▫ Archive mode include recursive copy, sym links, permissions, time, group, owner and device files.  rsync -r -a -v ~/proj user@host:~/backups/ • Specifying remote shell ▫ Additional information for the remote shell used to setup connection can be set using -e flag ▫ Setting the ssh port during transfer  rsync -rav -e ‘ssh -p 2257’ ~/proj user@host:~/backups/ • Filtering files ▫ rsync can filter files to be copied using filter rules ▫ Filtering ‘.o’ files  rsync -rav --exclude=“*.o” ~/proj user@host:~/backups/ 01-03-2018
  • 4. Gaurav Mishra <gmishx@gmail.com> Using rsync • Performing compression on transmission ▫ rsync can compress the transmission to save bandwidth  rsync -z -r ~/project user@host:~/backups/ • Updating a backup ▫ Using update options, rsync will not transfer files which are new in the destination  rsync -av <-u/--update> ~/project user@host:~/repository/ • Deleting old files ▫ rsync support delete option which removes files from the destination which are not in the source ▫ To use this option, whole directory must be synchronized  rsync -a --delete ~/project user@host:~/repository/ 01-03-2018