SlideShare ist ein Scribd-Unternehmen logo
1 von 41
[object Object],[object Object]
Rsync Backups ,[object Object],Nicholas and Nick Paun
The Plan ,[object Object]
We needed to be able to keep the backups for at least 30 days.
The only way we could do this is by using incremental backups.
After ruling out large, expensive proprietary systems, we chose  rsync .
About  rsync ,[object Object]
Because of  rsync 's algorithm we do not transmit the full data over the network (except for the first time.)
Rsync  is very reliable and rarely breaks due to file changes.
Version 1: The Scripts ,[object Object]
These simple scripts had no error checking, but they worked very well!
We needed to backup Netware servers too, so we used NCP mounting ,  which was very slow.
The Scripts echo   "Here we rsync DATA volume on CASADMLX server to /bkup/casadmlx/DATA/ folder on CASARKLX server" rsync  -av --link-dest= /bkup/casadmlx/DATA/current root@casadmlx:/media/nss/DATA/ /bkup/casadmlx/DATA/ $date rm /bkup/casadmlx/DATA/current ln  -s  /bkup/casadmlx/DATA/ $date  /bkup/casadmlx/DATA/current   rm  -r  /bkup/casadmlx/DATA/ `date --date='30 days ago' +%F`
The Scripts echo   "Here we rsync DATA volume on CASADM server to /bkup/casadm/DATA/ folder on CASARKLX server" ncpmount  -S  casadm  -A  casadm  -U  .bkup.cs.users.selkirk  -P  provo /mnt/casadm/ rsync  -av --link-dest= /bkup/casadm/DATA/current /mnt/casadm/DATA/ /bkup/casadm/DATA/ $date rm /bkup/casadm/DATA/current ln  -s  /bkup/casadm/DATA/ $date  /bkup/casadm/DATA/current   rm  -r  /bkup/casadm/DATA/ `date --date='30 days ago' +%F` umount /mnt/casadm/
The Scripts echo   "Here we rsync INSTRUCTORS volume on FS1 server to /bkup/fs1/INSTRUCTORS/ folder on CASARKLX server" mount.cifs //fs1/INSTRUCTORS /mnt/fs1/ -o user=Administrator,pass=provo rsync  -av -e  'ssh -p7774'   --link-dest= /bkup/fs1/INSTRUCTORS/current /mnt/fs1/INSTRUCTORS/ /bkup/fs1/INSTRUCTORS/ $date rm /bkup/fs1/INSTRUCTORS/current ln  -s  /bkup/fs1/INSTRUCTORS/ $date  /bkup/fs1/INSTRUCTORA/current   rm  -r  /bkup/fs1/INSTRUCTORS/ `date --date='30 days ago' +%F` umount /mnt/fs1/
Version 2: alpine-backup ,[object Object]
We wanted to have good error checking, replication, reporting and central control.
We also wanted to actually understand what was going on and we wanted a system that would fit our exact needs. So we wrote our own.
Version 2: alpine-backup ,[object Object]
We decided to implement only the bare-minimum that we needed.
The result was a 100-line script that supports custom mount drivers and performs an incremental backup using  rsync .
alpine-backup function  backup ( $opt , $src , $dest , $date , $name )  {    $_opt  =  OPTIONS ;    passthru ( "rsync  $_opt   $opt  --link-dest  $dest /current  $src   $dest / $date " , $return );   if ( $return  !=  0 )    {     echo( "* Backup Failure ( $name ): rsync did not finish sucessfully." );     die( 1 );    }      unlink ( " $dest /current" );    symlink ( " $dest / $date " , " $dest /current" );   echo( "* Backup Successful:  $name " );  } ,[object Object]
Google Code:  http://alpine-backup.googlecode.com
Our backup directory
Configuration files ;; silvoes2lx backup config   ;; September 2010 -- Nicholas Paun   [APPS]   source  =   "root@silvoes2lx:/media/nss/APPS/"   dest  =   "/bkup/silvoes2lx/APPS"   opt  =   "-e 'ssh -p7774'"   delete_after  =   "+30"   [HOME]   source  =   "root@silvoes2lx:/media/nss/HOME/"   dest  =   "/bkup/silvoes2lx/HOME"   opt  =   "-e 'ssh -p7774'"   delete_after  =   "+30"
Mount Drivers function   mountfs ( $user , $server , $command )   {      $return   =   passthru ( "ssh   $user @ $server   ' $command   stop'" );     return(! $return );   } function   umountfs ( $user , $server , $command )   {      $return   =   passthru ( "ssh   $user @ $server   ' $command   start'" );     return(! $return );   }
Logging
Experiments ,[object Object]
Experimented with  rsync  daemons
We used batch files for replication
We ran rsync on cygwin (too slow.)
Backed up Windows servers via CIFS mounting
We setup Groupwise backups
We also started iPrint backups
Syncing using Batch Files ,[object Object]
This was our first attempt at offsite backups.
It had a drawback of losing sync if files had changed in between batches.
Syncing using Batch Files ,[object Object]
The second one uses --read-batch to perform the backup.
rsync -av --write-batch=SCRATCH.batch --link-dest=/bkup/caslablx/SCRATCH/current /mnt/caslablx/SCRATCH/ /bkup/caslablx/SCRATCH/$date
ssh n10arklx rsync -av --read-batch=- --link-dest=/bkup/caslablx/SCRATCH/current /bkup/caslablx/SCRATCH/$date <SCRATCH.batch

Weitere ähnliche Inhalte

Was ist angesagt?

Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014D
 
PHP development with Docker
PHP development with DockerPHP development with Docker
PHP development with DockerYosh de Vos
 
Docker in 30 minutes
Docker in 30 minutesDocker in 30 minutes
Docker in 30 minutesSteve Poole
 
PHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudPHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudSalesforce Developers
 
Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014André Rømcke
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 applicationRoman Rodomansky
 
Wordpress y Docker, de desarrollo a produccion
Wordpress y Docker, de desarrollo a produccionWordpress y Docker, de desarrollo a produccion
Wordpress y Docker, de desarrollo a produccionSysdig
 
Performance all teh things
Performance all teh thingsPerformance all teh things
Performance all teh thingsMarcus Deglos
 
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOpsОмские ИТ-субботники
 
Setup 3 Node Kafka Cluster on AWS - Hands On
Setup 3 Node Kafka Cluster on AWS - Hands OnSetup 3 Node Kafka Cluster on AWS - Hands On
Setup 3 Node Kafka Cluster on AWS - Hands Onhkbhadraa
 
Compiling linux kernel and submit first patch
Compiling linux kernel and submit first patchCompiling linux kernel and submit first patch
Compiling linux kernel and submit first patchMayur Patil
 
WP-CLI Workshop at WordPress Meetup Cluj-Napoca
WP-CLI Workshop at WordPress Meetup Cluj-NapocaWP-CLI Workshop at WordPress Meetup Cluj-Napoca
WP-CLI Workshop at WordPress Meetup Cluj-Napoca4nd4p0p
 
Docker orchestration using core os and ansible - Ansible IL 2015
Docker orchestration using core os and ansible - Ansible IL 2015Docker orchestration using core os and ansible - Ansible IL 2015
Docker orchestration using core os and ansible - Ansible IL 2015Leonid Mirsky
 
Vagrant - Version control your dev environment
Vagrant - Version control your dev environmentVagrant - Version control your dev environment
Vagrant - Version control your dev environmentbocribbz
 
Continuous Security
Continuous SecurityContinuous Security
Continuous SecuritySysdig
 
Docker Runtime Security
Docker Runtime SecurityDocker Runtime Security
Docker Runtime SecuritySysdig
 
Be a happier developer with Docker: Tricks of the trade
Be a happier developer with Docker: Tricks of the tradeBe a happier developer with Docker: Tricks of the trade
Be a happier developer with Docker: Tricks of the tradeNicola Paolucci
 
How Reconnix Is Using Docker
How Reconnix Is Using DockerHow Reconnix Is Using Docker
How Reconnix Is Using DockerRuss Mckendrick
 

Was ist angesagt? (20)

Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014
 
PHP development with Docker
PHP development with DockerPHP development with Docker
PHP development with Docker
 
Docker in 30 minutes
Docker in 30 minutesDocker in 30 minutes
Docker in 30 minutes
 
Exploring Docker Security
Exploring Docker SecurityExploring Docker Security
Exploring Docker Security
 
PHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudPHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the Cloud
 
Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 application
 
Wordpress y Docker, de desarrollo a produccion
Wordpress y Docker, de desarrollo a produccionWordpress y Docker, de desarrollo a produccion
Wordpress y Docker, de desarrollo a produccion
 
Performance all teh things
Performance all teh thingsPerformance all teh things
Performance all teh things
 
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
 
Setup 3 Node Kafka Cluster on AWS - Hands On
Setup 3 Node Kafka Cluster on AWS - Hands OnSetup 3 Node Kafka Cluster on AWS - Hands On
Setup 3 Node Kafka Cluster on AWS - Hands On
 
Compiling linux kernel and submit first patch
Compiling linux kernel and submit first patchCompiling linux kernel and submit first patch
Compiling linux kernel and submit first patch
 
WP-CLI Workshop at WordPress Meetup Cluj-Napoca
WP-CLI Workshop at WordPress Meetup Cluj-NapocaWP-CLI Workshop at WordPress Meetup Cluj-Napoca
WP-CLI Workshop at WordPress Meetup Cluj-Napoca
 
Docker toolbox
Docker toolboxDocker toolbox
Docker toolbox
 
Docker orchestration using core os and ansible - Ansible IL 2015
Docker orchestration using core os and ansible - Ansible IL 2015Docker orchestration using core os and ansible - Ansible IL 2015
Docker orchestration using core os and ansible - Ansible IL 2015
 
Vagrant - Version control your dev environment
Vagrant - Version control your dev environmentVagrant - Version control your dev environment
Vagrant - Version control your dev environment
 
Continuous Security
Continuous SecurityContinuous Security
Continuous Security
 
Docker Runtime Security
Docker Runtime SecurityDocker Runtime Security
Docker Runtime Security
 
Be a happier developer with Docker: Tricks of the trade
Be a happier developer with Docker: Tricks of the tradeBe a happier developer with Docker: Tricks of the trade
Be a happier developer with Docker: Tricks of the trade
 
How Reconnix Is Using Docker
How Reconnix Is Using DockerHow Reconnix Is Using Docker
How Reconnix Is Using Docker
 

Ähnlich wie How we setup Rsync-powered Incremental Backups

From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...Alexander Dean
 
OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...
OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...
OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...NETWAYS
 
OpenStack Tokyo Meeup - Gluster Storage Day
OpenStack Tokyo Meeup - Gluster Storage DayOpenStack Tokyo Meeup - Gluster Storage Day
OpenStack Tokyo Meeup - Gluster Storage DayDan Radez
 
Deploying Rails Applications with Capistrano
Deploying Rails Applications with CapistranoDeploying Rails Applications with Capistrano
Deploying Rails Applications with CapistranoAlmir Mendes
 
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine YardHow I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine YardSV Ruby on Rails Meetup
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabricandymccurdy
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012Carlos Sanchez
 
Chef - industrialize and automate your infrastructure
Chef - industrialize and automate your infrastructureChef - industrialize and automate your infrastructure
Chef - industrialize and automate your infrastructureMichaël Lopez
 
Architecting cloud
Architecting cloudArchitecting cloud
Architecting cloudTahsin Hasan
 
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...NETWAYS
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slidesharetomcopeland
 
Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Carlos Sanchez
 
Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!Derek Willian Stavis
 
Manage WordPress with Awesome using wp cli
Manage WordPress with Awesome using wp cliManage WordPress with Awesome using wp cli
Manage WordPress with Awesome using wp cliGetSource
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby TeamArto Artnik
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slidesDocker, Inc.
 

Ähnlich wie How we setup Rsync-powered Incremental Backups (20)

From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
 
OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...
OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...
OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...
 
Go Replicator
Go ReplicatorGo Replicator
Go Replicator
 
OpenStack Tokyo Meeup - Gluster Storage Day
OpenStack Tokyo Meeup - Gluster Storage DayOpenStack Tokyo Meeup - Gluster Storage Day
OpenStack Tokyo Meeup - Gluster Storage Day
 
Deploying Rails Applications with Capistrano
Deploying Rails Applications with CapistranoDeploying Rails Applications with Capistrano
Deploying Rails Applications with Capistrano
 
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine YardHow I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
 
infra-as-code
infra-as-codeinfra-as-code
infra-as-code
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012
 
Chef - industrialize and automate your infrastructure
Chef - industrialize and automate your infrastructureChef - industrialize and automate your infrastructure
Chef - industrialize and automate your infrastructure
 
With one click
With one clickWith one click
With one click
 
Architecting cloud
Architecting cloudArchitecting cloud
Architecting cloud
 
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshare
 
Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012
 
Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!
 
Manage WordPress with Awesome using wp cli
Manage WordPress with Awesome using wp cliManage WordPress with Awesome using wp cli
Manage WordPress with Awesome using wp cli
 
EC2
EC2EC2
EC2
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slides
 

Kürzlich hochgeladen

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 

Kürzlich hochgeladen (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

How we setup Rsync-powered Incremental Backups

  • 1.
  • 2.
  • 3.
  • 4. We needed to be able to keep the backups for at least 30 days.
  • 5. The only way we could do this is by using incremental backups.
  • 6. After ruling out large, expensive proprietary systems, we chose rsync .
  • 7.
  • 8. Because of rsync 's algorithm we do not transmit the full data over the network (except for the first time.)
  • 9. Rsync is very reliable and rarely breaks due to file changes.
  • 10.
  • 11. These simple scripts had no error checking, but they worked very well!
  • 12. We needed to backup Netware servers too, so we used NCP mounting , which was very slow.
  • 13. The Scripts echo &quot;Here we rsync DATA volume on CASADMLX server to /bkup/casadmlx/DATA/ folder on CASARKLX server&quot; rsync -av --link-dest= /bkup/casadmlx/DATA/current root@casadmlx:/media/nss/DATA/ /bkup/casadmlx/DATA/ $date rm /bkup/casadmlx/DATA/current ln -s /bkup/casadmlx/DATA/ $date /bkup/casadmlx/DATA/current rm -r /bkup/casadmlx/DATA/ `date --date='30 days ago' +%F`
  • 14. The Scripts echo &quot;Here we rsync DATA volume on CASADM server to /bkup/casadm/DATA/ folder on CASARKLX server&quot; ncpmount -S casadm -A casadm -U .bkup.cs.users.selkirk -P provo /mnt/casadm/ rsync -av --link-dest= /bkup/casadm/DATA/current /mnt/casadm/DATA/ /bkup/casadm/DATA/ $date rm /bkup/casadm/DATA/current ln -s /bkup/casadm/DATA/ $date /bkup/casadm/DATA/current rm -r /bkup/casadm/DATA/ `date --date='30 days ago' +%F` umount /mnt/casadm/
  • 15. The Scripts echo &quot;Here we rsync INSTRUCTORS volume on FS1 server to /bkup/fs1/INSTRUCTORS/ folder on CASARKLX server&quot; mount.cifs //fs1/INSTRUCTORS /mnt/fs1/ -o user=Administrator,pass=provo rsync -av -e 'ssh -p7774' --link-dest= /bkup/fs1/INSTRUCTORS/current /mnt/fs1/INSTRUCTORS/ /bkup/fs1/INSTRUCTORS/ $date rm /bkup/fs1/INSTRUCTORS/current ln -s /bkup/fs1/INSTRUCTORS/ $date /bkup/fs1/INSTRUCTORA/current rm -r /bkup/fs1/INSTRUCTORS/ `date --date='30 days ago' +%F` umount /mnt/fs1/
  • 16.
  • 17. We wanted to have good error checking, replication, reporting and central control.
  • 18. We also wanted to actually understand what was going on and we wanted a system that would fit our exact needs. So we wrote our own.
  • 19.
  • 20. We decided to implement only the bare-minimum that we needed.
  • 21. The result was a 100-line script that supports custom mount drivers and performs an incremental backup using rsync .
  • 22.
  • 23. Google Code: http://alpine-backup.googlecode.com
  • 25. Configuration files ;; silvoes2lx backup config ;; September 2010 -- Nicholas Paun [APPS] source = &quot;root@silvoes2lx:/media/nss/APPS/&quot; dest = &quot;/bkup/silvoes2lx/APPS&quot; opt = &quot;-e 'ssh -p7774'&quot; delete_after = &quot;+30&quot; [HOME] source = &quot;root@silvoes2lx:/media/nss/HOME/&quot; dest = &quot;/bkup/silvoes2lx/HOME&quot; opt = &quot;-e 'ssh -p7774'&quot; delete_after = &quot;+30&quot;
  • 26. Mount Drivers function  mountfs ( $user , $server , $command )   {     $return  =  passthru ( &quot;ssh  $user @ $server   ' $command   stop'&quot; );     return(! $return );   } function  umountfs ( $user , $server , $command )   {     $return  =  passthru ( &quot;ssh  $user @ $server   ' $command   start'&quot; );     return(! $return );   }
  • 28.
  • 29. Experimented with rsync daemons
  • 30. We used batch files for replication
  • 31. We ran rsync on cygwin (too slow.)
  • 32. Backed up Windows servers via CIFS mounting
  • 34. We also started iPrint backups
  • 35.
  • 36. This was our first attempt at offsite backups.
  • 37. It had a drawback of losing sync if files had changed in between batches.
  • 38.
  • 39. The second one uses --read-batch to perform the backup.
  • 40. rsync -av --write-batch=SCRATCH.batch --link-dest=/bkup/caslablx/SCRATCH/current /mnt/caslablx/SCRATCH/ /bkup/caslablx/SCRATCH/$date
  • 41. ssh n10arklx rsync -av --read-batch=- --link-dest=/bkup/caslablx/SCRATCH/current /bkup/caslablx/SCRATCH/$date <SCRATCH.batch
  • 42.
  • 43. The QNAPs are NASs running some mystery meat Linux, that was the source of many headaches.
  • 44. Initially, we added more configuration files that would copy the backups from the main backup server to the offsite one, but this grew quite complicated.
  • 46.
  • 47. But, when a QNAP reads the configuration files, it would run in slave mode and pull the backups from the backup server, instead of the live server.
  • 48. This change removed the need for half of our configuration files.
  • 51.
  • 52. This means that we can apply rsync 's deduplication ( --link-dest ) to GroupWise too.
  • 53. We save 90-95% disk space and it is 10 times faster compared to a full backup.
  • 54.
  • 55. To snapshot NSS volumes we used Dean Giles' perl scripts (found on Cool Solutions).
  • 56. If we ran GroupWise on an LVM volume, we could use LVM snapshots instead.
  • 57. GroupWise Mount Driver function  mountfs ( $user , $server , $command )   {     $return  =  passthru ( &quot;snapup.sh&quot; );     return(! $return );   } function  umountfs ( $user , $server , $command )   {     $return  =  passthru ( &quot;snapdn.sh&quot; );     return(! $return );   }
  • 58.
  • 62.
  • 63. So we added a MySQL agent to our tools.
  • 64. To gain maximum space savings, we split up the SQL files into one file per table.
  • 65. Now we can use rsync 's --link-dest feature on our DBs too.
  • 66.
  • 67. Demo: Drupal DB Restore
  • 68. Demo: Drupal DB Restore
  • 69. Demo: Drupal DB Restore
  • 70. Demo: Drupal DB Restore
  • 71.
  • 72. We had never seen an Oracle database before, so we did some searching and figured out how to use expdp.
  • 73. First we logged in to the database and set up a directory handle:
  • 74. CREATE DIRECTORY sgrcdev AS '/g/sgrcdev' ;
  • 75.
  • 76. expdp system/$passwd@$db directory=$db full=y dumpfile=$db.dmp logfile=$db.log
  • 77. … And then, we just copy the backups over and reset dump directory.
  • 79.
  • 80. Now, we can control all of our backups (FS, GroupWise and Database) from one place, using one lightweight tool.
  • 81. We save a lot of disk space by using rsync .
  • 82. Most importantly, we achieved peace of mind.
  • 83.

Hinweis der Redaktion

  1. TTP Conference 2011 – Celebrating 25 years of supporting Novell Solutions
  2. According to the man page, --link-dest hard links to files in the link destination when the backup is the same as the source. (ie. identical files).
  3. We set our link dest to current, a symbolic link always pointing to the current backup, then preform the backup. Next we set our current link to the latest backup and delete backups older than 30 days.
  4. This is how we backed up a Netware server using NCP.
  5. ..and a Windows one, using CIFS.
  6. This is a screenshot of alpine-backup&apos;s code. As you can see, it is quite similar to our bash scripts, but adds error checking and is written in PHP. If you want to have a look at alpine-backup, the URLs are on the bottom.
  7. This what our backup directory looks like. As you can see, only the first backup is large, the rest are quite small, only about 200MB large.
  8. This an example of the configuration file format alpine-backup uses. It is an INI file. (I used this format because PHP had a built-in parser for it.)
  9. This what our mount drivers look like. This particular one actually stops and restarts services for backup. (We use it for iPrint backups.)
  10. Here is a screenshot of the mail we get from cron. As you can see from the summary, the backups are all successful!
  11. This is a diagram of Selkirk College&apos;s organizational structure. All our servers are backed up in at least two locations. As you can see, there are two islands: the Nelson-centric one and the Castlegar-centric one. This is due to the fact that there are no fibre links between Castlegar and Nelson.
  12. ...about half. (we sometimes use different parameters for our main and offsite backups.)
  13. At this point I&apos;d like to show you our first demo: How no-change syncing works. QNAP doing a Live Backup
  14. QNAP in Slave Mode
  15. Well, this does not explain much, let&apos;s have a look at snapup.sh
  16. The first two commands SSH into our GroupWise server and use the perl scripts to create and activate a snapshot. Then we mount the snapshot and perform the backup via SSH.
  17. Now, I&apos;m going to move on to our next demo. Live Post Office
  18. We start up the POA using an a backup.
  19. ..and now: some old mail.
  20. alp-dbrestore does not like dashes in DB Names.
  21. Next, I&apos;m going to show you how we restore our MySQL backups. First, we create test article.
  22. Then, we create a new DB with an old version of the site. (Avoid dashes in database name)
  23. We switch Drupal to the restore DB.
  24. The article has now been rolled back.
  25. This is a screenshot of our Oracle backups in action. Since we&apos;re running early, I&apos;m going to show you what alpine-backup&apos;s code is like.
  26. Any Questions? TTP Conference 2011 – Celebrating 25 years of supporting Novell Solutions