SlideShare una empresa de Scribd logo
1 de 38
Descargar para leer sin conexión
Backups,
esta vez de verdad
     Svet Ivantchev, eFaber




   UniEE, 27 de marzo de 2007
Las copias de seguridad

• Necesidad
• Ya, pero es un rollo
• Los dos tipos de personas
¿Cómo nos quedará?




   X     X
¿Cómo nos quedará?
¿Cómo nos quedará?
¿Cómo nos quedará?

•   cd /backup/snapshots/

•   ls -l

    drwxr-xr-x   14   svet   admin   476   Mar   20   23:44   snapshot-2007-03-20
    drwxr-xr-x   14   svet   admin   476   Mar   21   23:44   snapshot-2007-03-21
    drwxr-xr-x   14   svet   admin   476   Mar   22   23:44   snapshot-2007-03-22
    drwxr-xr-x   14   svet   admin   476   Mar   23   23:44   snapshot-2007-03-23
    drwxr-xr-x   14   svet   admin   476   Mar   24   23:44   snapshot-2007-03-24
    drwxr-xr-x   14   svet   admin   476   Mar   25   23:44   snapshot-2007-03-25
Foto
¿Cuanto ocupa?
•   $ cd /backup/snapshots/
    $ du -s -h snapshot-2007-03-20
    470M    snapshot-2007-03-20

    $ du -s -h snapshot-2007-03-23
    688M    snapshot-2007-03-23

    $ du -s -h snapshot-2007-03-25
    689M    snapshot-2007-03-25

    $ du -s -h
    753M    .

•   470M + 688M + 689M + ⋯ = 753M ???
¿Cuanto ocupa?
    •   $ cd /backup/snapshots/
        $ du -s -h snapshot-2007-03-20
        470M    snapshot-2007-03-20

        $ du -s -h snapshot-2007-03-23
        688M    snapshot-2007-03-23

        $ du -s -h snapshot-2007-03-25
        689M    snapshot-2007-03-25

        $ du -s -h
        753M    .

    •   470M + 688M + 689M + ⋯ = 753M ???



Nota: la programación necesaria son dos lineas (2 de verdad)
Componentes
•   Software:

    •   rsync

    •   cp y hardlinks

    •   (opcionalmente) cron

•   Hardware (opcional)

    •   Un NSLU2 (+ Unslung firmware)

    •   Disco duro externo USB2
rsync
•   $ rsync -ae ssh mi_portatil:/home/datos_importantes /backup/2007-03-27
Día 1
Día 2
Día 3
Evolución
No todo cambia
Nuevo
Nuevo
Nuevo
Enlaces simbólicos

•   $ ls -l
    total 85052
    -rw-r--r-- 1 svet svet 86999860 2007-03-26 22:27 fichero1.dat

    $ ln -s fichero1.dat fichero2.dat
    $ ls -l
    total 85052
    -rw-r--r-- 1 svet svet 86999860 2007-03-26 22:27 fichero1.dat
    lrwxrwxrwx 1 svet svet       12 2007-03-26 22:27 fichero2.dat -> fichero1.dat

    $ du -s
    85056   .
Enlaces (hardlinks)
•   $ ls -l
    total 85052
    -rw-r--r-- 1 svet svet 86999860 2007-03-26 22:27 fichero1.dat

    $ ln fichero1.dat fichero2.dat
    $ ls -l
    total 170104
    -rw-r--r-- 2 svet svet 86999860 2007-03-26 22:27 fichero1.dat
    -rw-r--r-- 2 svet svet 86999860 2007-03-26 22:27 fichero2.dat

    $ du -s
    85056   .

    $ ls -i fichero1.dat
    3908701 fichero1.dat

    $ ls -i fichero2.dat
    3908701 fichero2.dat
cp -al origen destino
Todo junto
•   rsync -v --delete -a servidor:/mis_datos /backup

    cp -al /backup/mis_datos /snapshots/snapshot-`date -I`




      X       X
Harwdare

         Cisco/Linksys NSLU2:

     Intel XScale IXP420, 266 MHz,
        8MB flash, 32MB SDRAM,
                Ethernet,
            2 puertos USB 2
Unslung
•   $ ssh -l root 192.168.1.78

    Welcome to Unslung V2.3R63-uNSLUng-6.8-beta

       ---------- NOTE: THIS SYSTEM IS CURRENTLY UNSLUNG ----------

    BusyBox v0.60.4 (2005.03.22-06:52+0000) Built-in shell (ash)
    Enter 'help' for a list of built-in commands.

    # df

    Filesystem           1k-blocks      Used Available Use% Mounted on
    rootfs               240125792 75010680 162675564 32% /
    /dev/sdb1                 6528      6332       196 97% /initrd
    /dev/sdb1            240125792 75010680 162675564 32% /
    /dev/sda1            307426936 223085068 81218592 73% /share/flash/data
    /dev/sdb1            240125792 75010680 162675564 32% /share/hdd/data
    /dev/sdb2               116661      4155    111302   4% /share/hdd/conf
    /dev/sdb2               116661      4155    111302   4% /share/flash/conf
Unslung: ipkg

•   # ipkg list

    abook - 0.5.6-1 - Abook is a text-based addressbook program designed ...
    adduser - 1.1.3-9 - a multi-call binary for login and user account administration
    adns - 1.3-2 - Asynchronous resolver library and DNS resolver utilities.
    alac-decoder - 0.1.0-2 - A decoder for the apple lossless file format
    ...
    asterisk - 1.2.14-3 - Open Source VoIP PBX System
    ...
    rsync - 2.6.9-2 - fast remote file copy program (like rcp)
    ...
    zoo - 2.10-1 - zoo - File archiving utility with compression
    zsh - 4.2.6-3 - Zsh is a shell designed for interactive use.
Unslung: ipkg
•   # ipkg info rsync

    Package: rsync
    Version: 2.6.9-2
    Status: install user installed
    Section: net
    Architecture: armeb
    maintainer: NSLU2 Linux <nslu2-linux@yahoogroups.com>
    MD5Sum: 4a7310cefe3d43ab5e6bd49577cdd057
    Size: 200677
    Filename: rsync_2.6.9-2_armeb.ipk
    Source: http://www.samba.org/ftp/rsync/rsync-2.6.9.tar.gz
    Description: fast remote file copy program (like rcp)

    # ipkg install rsync
    # ipkg install bash
Backups again
Backups again
Backups again
Backups again
Extra: Amazon S3
Ejemplo de uso

•   import flickr
    import BitBucket
    import urllib
    me = flickr.people_findByUsername(quot;svetquot;)
    bucket = BitBucket.BitBucket(quot;svet-flickrquot;)
    page = 1
    total_f = found_f = 0
    while 1:
        try:
             photos = flickr.people_getPublicPhotos(me.id, 1000, page)
             for photo in photos:
                 total_f = total_f + 1
                 if bucket.has_key(quot;%s-%squot; % (photo.title, photo.id)):
                     pass # ok, ya la tenemos
                 else:
                     data = urllib.urlretrieve(quot;http://static.flickr.com/%s/%s_%s_o.jpgquot; % 
                             (photo.server, photo.id, photo.secret), quot;flickr.jpgquot;)
                     bits = BitBucket.Bits(filename=quot;flickr.jpgquot;)
                     bucket[quot;%s-%squot; % (photo.title, photo.id)] = bits
                     print quot;saving %squot; % photo.title
                     found_f = found_f + 1
             page = page + 1
        except AttributeError:
             break # bucket vacío
    print quot;Encontradas %s fotos, guardadas %s nuevasquot; % (total_f, found_f)
Refrencias

•   http://www.nslu2-linux.org/

•   http://samba.anu.edu.au/rsync/

•   http://aws.amazon.com

•   http://www.mikerubel.org/computers/rsync_snapshots/

•   http://www.postneo.com/2006/03/22/

Más contenido relacionado

La actualidad más candente

2005_Structures and functions of Makefile
2005_Structures and functions of Makefile2005_Structures and functions of Makefile
2005_Structures and functions of Makefile
NakCheon Jung
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linux
tutorialsruby
 
GIT rozproszony system kontroli wersji
GIT rozproszony system kontroli wersjiGIT rozproszony system kontroli wersji
GIT rozproszony system kontroli wersji
3camp
 
Ecos基础应用介绍
Ecos基础应用介绍Ecos基础应用介绍
Ecos基础应用介绍
wanglei999
 

La actualidad más candente (18)

How to create a pluggable database by cloning an existing local pdb
How to create a pluggable database by cloning an existing local pdbHow to create a pluggable database by cloning an existing local pdb
How to create a pluggable database by cloning an existing local pdb
 
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 ...
 
2005_Structures and functions of Makefile
2005_Structures and functions of Makefile2005_Structures and functions of Makefile
2005_Structures and functions of Makefile
 
How to install
How to installHow to install
How to install
 
Capital onehadoopclass
Capital onehadoopclassCapital onehadoopclass
Capital onehadoopclass
 
Keep it simple web development stack
Keep it simple web development stackKeep it simple web development stack
Keep it simple web development stack
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linux
 
GIT rozproszony system kontroli wersji
GIT rozproszony system kontroli wersjiGIT rozproszony system kontroli wersji
GIT rozproszony system kontroli wersji
 
M09-Cross validating-naive-bayes
M09-Cross validating-naive-bayesM09-Cross validating-naive-bayes
M09-Cross validating-naive-bayes
 
M11 bagging loo cv
M11 bagging loo cvM11 bagging loo cv
M11 bagging loo cv
 
Стажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonb
Стажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonbСтажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonb
Стажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonb
 
Kubernetes Tutorial
Kubernetes TutorialKubernetes Tutorial
Kubernetes Tutorial
 
Ecos基础应用介绍
Ecos基础应用介绍Ecos基础应用介绍
Ecos基础应用介绍
 
M12 random forest-part01
M12 random forest-part01M12 random forest-part01
M12 random forest-part01
 
Postgresql 12 streaming replication hol
Postgresql 12 streaming replication holPostgresql 12 streaming replication hol
Postgresql 12 streaming replication hol
 
Crack.ba
Crack.baCrack.ba
Crack.ba
 
3.3 perform basic file management
3.3 perform basic file management3.3 perform basic file management
3.3 perform basic file management
 
使用 CLI 管理 OpenStack 平台
使用 CLI 管理 OpenStack 平台使用 CLI 管理 OpenStack 平台
使用 CLI 管理 OpenStack 平台
 

Destacado (6)

Caricaturas
CaricaturasCaricaturas
Caricaturas
 
Clusters Beowulf
Clusters BeowulfClusters Beowulf
Clusters Beowulf
 
Photo Book
Photo BookPhoto Book
Photo Book
 
La Privatizacion, Todo Un Caso
La Privatizacion, Todo Un CasoLa Privatizacion, Todo Un Caso
La Privatizacion, Todo Un Caso
 
Frases Celebres
Frases CelebresFrases Celebres
Frases Celebres
 
Philanthropic Travel Worldwide
Philanthropic Travel WorldwidePhilanthropic Travel Worldwide
Philanthropic Travel Worldwide
 

Similar a Backups

glance replicator
glance replicatorglance replicator
glance replicator
irix_jp
 
Docker - container and lightweight virtualization
Docker - container and lightweight virtualization Docker - container and lightweight virtualization
Docker - container and lightweight virtualization
Sim Janghoon
 
EF09-Installing-Alfresco-components-1-by-1.pdf
EF09-Installing-Alfresco-components-1-by-1.pdfEF09-Installing-Alfresco-components-1-by-1.pdf
EF09-Installing-Alfresco-components-1-by-1.pdf
DangGonz
 
Creating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server HardeningCreating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server Hardening
archwisp
 

Similar a Backups (20)

glance replicator
glance replicatorglance replicator
glance replicator
 
hacking-embedded-devices.pptx
hacking-embedded-devices.pptxhacking-embedded-devices.pptx
hacking-embedded-devices.pptx
 
Docker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in PragueDocker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in Prague
 
Linux 系統管理與安全:基本 Linux 系統知識
Linux 系統管理與安全:基本 Linux 系統知識Linux 系統管理與安全:基本 Linux 系統知識
Linux 系統管理與安全:基本 Linux 系統知識
 
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation CenterDUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
 
PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22
 
Docker - container and lightweight virtualization
Docker - container and lightweight virtualization Docker - container and lightweight virtualization
Docker - container and lightweight virtualization
 
SiteGround Tech TeamBuilding
SiteGround Tech TeamBuildingSiteGround Tech TeamBuilding
SiteGround Tech TeamBuilding
 
Love The Terminal
Love The TerminalLove The Terminal
Love The Terminal
 
Debugging Ruby Systems
Debugging Ruby SystemsDebugging Ruby Systems
Debugging Ruby Systems
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
 
EF09-Installing-Alfresco-components-1-by-1.pdf
EF09-Installing-Alfresco-components-1-by-1.pdfEF09-Installing-Alfresco-components-1-by-1.pdf
EF09-Installing-Alfresco-components-1-by-1.pdf
 
Docker practice
Docker practiceDocker practice
Docker practice
 
Drizzle to MySQL, Stress Free Migration
Drizzle to MySQL, Stress Free MigrationDrizzle to MySQL, Stress Free Migration
Drizzle to MySQL, Stress Free Migration
 
Docker Demo @ IuK Seminar
Docker Demo @ IuK SeminarDocker Demo @ IuK Seminar
Docker Demo @ IuK Seminar
 
AtlasCamp 2015 Docker continuous integration training
AtlasCamp 2015 Docker continuous integration trainingAtlasCamp 2015 Docker continuous integration training
AtlasCamp 2015 Docker continuous integration training
 
Creating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server HardeningCreating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server Hardening
 
High Availability With DRBD & Heartbeat
High Availability With DRBD & HeartbeatHigh Availability With DRBD & Heartbeat
High Availability With DRBD & Heartbeat
 
Malcon2017
Malcon2017Malcon2017
Malcon2017
 
Jackpot! Attacking Arcade Machines
Jackpot! Attacking Arcade MachinesJackpot! Attacking Arcade Machines
Jackpot! Attacking Arcade Machines
 

Más de Svet Ivantchev

Learning Analytics and Online Learning: New Oportunities?
Learning Analytics and Online Learning: New Oportunities?Learning Analytics and Online Learning: New Oportunities?
Learning Analytics and Online Learning: New Oportunities?
Svet Ivantchev
 
Libros electrónicos IV: ePub 2
Libros electrónicos IV: ePub 2Libros electrónicos IV: ePub 2
Libros electrónicos IV: ePub 2
Svet Ivantchev
 
Libros electrónicos III
Libros electrónicos IIILibros electrónicos III
Libros electrónicos III
Svet Ivantchev
 
Libros electrónicos II - ePub
Libros electrónicos II - ePubLibros electrónicos II - ePub
Libros electrónicos II - ePub
Svet Ivantchev
 
Libros electrónicos I
Libros electrónicos ILibros electrónicos I
Libros electrónicos I
Svet Ivantchev
 
Cloud Computing: Just Do It
Cloud Computing: Just Do ItCloud Computing: Just Do It
Cloud Computing: Just Do It
Svet Ivantchev
 
Cloud Computing: What it is, DOs and DON'Ts
Cloud Computing: What it is, DOs and DON'TsCloud Computing: What it is, DOs and DON'Ts
Cloud Computing: What it is, DOs and DON'Ts
Svet Ivantchev
 
Los mitos de la innovación
Los mitos de la innovaciónLos mitos de la innovación
Los mitos de la innovación
Svet Ivantchev
 

Más de Svet Ivantchev (20)

Machne Learning and Human Learning (2013).
Machne Learning and Human Learning (2013).Machne Learning and Human Learning (2013).
Machne Learning and Human Learning (2013).
 
Big Data: 
Some Questions in its Use in Applied Economics (2017)
Big Data: 
Some Questions in its Use in Applied Economics (2017)Big Data: 
Some Questions in its Use in Applied Economics (2017)
Big Data: 
Some Questions in its Use in Applied Economics (2017)
 
Introducción a Elixir
Introducción a ElixirIntroducción a Elixir
Introducción a Elixir
 
Gaztea Tech Robotica 2016
Gaztea Tech Robotica 2016Gaztea Tech Robotica 2016
Gaztea Tech Robotica 2016
 
Gaztea Tech 2015: 4. GT Drawbot Control
Gaztea Tech 2015: 4. GT Drawbot ControlGaztea Tech 2015: 4. GT Drawbot Control
Gaztea Tech 2015: 4. GT Drawbot Control
 
Gaztea Tech 2015: 3. Processing y Firmata
Gaztea Tech 2015: 3. Processing y FirmataGaztea Tech 2015: 3. Processing y Firmata
Gaztea Tech 2015: 3. Processing y Firmata
 
Gaztea Tech 2015: 2. El GT DrawBot
Gaztea Tech 2015: 2. El GT DrawBotGaztea Tech 2015: 2. El GT DrawBot
Gaztea Tech 2015: 2. El GT DrawBot
 
Gaztea Tech 2015: 1. Introducción al Arduino
Gaztea Tech 2015: 1. Introducción al ArduinoGaztea Tech 2015: 1. Introducción al Arduino
Gaztea Tech 2015: 1. Introducción al Arduino
 
Learning Analytics and Online Learning: New Oportunities?
Learning Analytics and Online Learning: New Oportunities?Learning Analytics and Online Learning: New Oportunities?
Learning Analytics and Online Learning: New Oportunities?
 
How Machine Learning and Big Data can Help Us with the Human Learning
How Machine Learning and Big Data can Help Us with the Human LearningHow Machine Learning and Big Data can Help Us with the Human Learning
How Machine Learning and Big Data can Help Us with the Human Learning
 
Vienen los Drones!
Vienen los Drones!Vienen los Drones!
Vienen los Drones!
 
Data Science
Data ScienceData Science
Data Science
 
Libros electrónicos IV: ePub 2
Libros electrónicos IV: ePub 2Libros electrónicos IV: ePub 2
Libros electrónicos IV: ePub 2
 
Libros electrónicos III
Libros electrónicos IIILibros electrónicos III
Libros electrónicos III
 
Libros electrónicos II - ePub
Libros electrónicos II - ePubLibros electrónicos II - ePub
Libros electrónicos II - ePub
 
Libros electrónicos I
Libros electrónicos ILibros electrónicos I
Libros electrónicos I
 
Cloud Computing: Just Do It
Cloud Computing: Just Do ItCloud Computing: Just Do It
Cloud Computing: Just Do It
 
Cloud Computing: What it is, DOs and DON'Ts
Cloud Computing: What it is, DOs and DON'TsCloud Computing: What it is, DOs and DON'Ts
Cloud Computing: What it is, DOs and DON'Ts
 
BigData
BigDataBigData
BigData
 
Los mitos de la innovación
Los mitos de la innovaciónLos mitos de la innovación
Los mitos de la innovación
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Backups

  • 1. Backups, esta vez de verdad Svet Ivantchev, eFaber UniEE, 27 de marzo de 2007
  • 2. Las copias de seguridad • Necesidad • Ya, pero es un rollo • Los dos tipos de personas
  • 6. ¿Cómo nos quedará? • cd /backup/snapshots/ • ls -l drwxr-xr-x 14 svet admin 476 Mar 20 23:44 snapshot-2007-03-20 drwxr-xr-x 14 svet admin 476 Mar 21 23:44 snapshot-2007-03-21 drwxr-xr-x 14 svet admin 476 Mar 22 23:44 snapshot-2007-03-22 drwxr-xr-x 14 svet admin 476 Mar 23 23:44 snapshot-2007-03-23 drwxr-xr-x 14 svet admin 476 Mar 24 23:44 snapshot-2007-03-24 drwxr-xr-x 14 svet admin 476 Mar 25 23:44 snapshot-2007-03-25
  • 8. ¿Cuanto ocupa? • $ cd /backup/snapshots/ $ du -s -h snapshot-2007-03-20 470M snapshot-2007-03-20 $ du -s -h snapshot-2007-03-23 688M snapshot-2007-03-23 $ du -s -h snapshot-2007-03-25 689M snapshot-2007-03-25 $ du -s -h 753M . • 470M + 688M + 689M + ⋯ = 753M ???
  • 9. ¿Cuanto ocupa? • $ cd /backup/snapshots/ $ du -s -h snapshot-2007-03-20 470M snapshot-2007-03-20 $ du -s -h snapshot-2007-03-23 688M snapshot-2007-03-23 $ du -s -h snapshot-2007-03-25 689M snapshot-2007-03-25 $ du -s -h 753M . • 470M + 688M + 689M + ⋯ = 753M ??? Nota: la programación necesaria son dos lineas (2 de verdad)
  • 10. Componentes • Software: • rsync • cp y hardlinks • (opcionalmente) cron • Hardware (opcional) • Un NSLU2 (+ Unslung firmware) • Disco duro externo USB2
  • 11. rsync • $ rsync -ae ssh mi_portatil:/home/datos_importantes /backup/2007-03-27
  • 17. Nuevo
  • 18. Nuevo
  • 19. Nuevo
  • 20. Enlaces simbólicos • $ ls -l total 85052 -rw-r--r-- 1 svet svet 86999860 2007-03-26 22:27 fichero1.dat $ ln -s fichero1.dat fichero2.dat $ ls -l total 85052 -rw-r--r-- 1 svet svet 86999860 2007-03-26 22:27 fichero1.dat lrwxrwxrwx 1 svet svet 12 2007-03-26 22:27 fichero2.dat -> fichero1.dat $ du -s 85056 .
  • 21. Enlaces (hardlinks) • $ ls -l total 85052 -rw-r--r-- 1 svet svet 86999860 2007-03-26 22:27 fichero1.dat $ ln fichero1.dat fichero2.dat $ ls -l total 170104 -rw-r--r-- 2 svet svet 86999860 2007-03-26 22:27 fichero1.dat -rw-r--r-- 2 svet svet 86999860 2007-03-26 22:27 fichero2.dat $ du -s 85056 . $ ls -i fichero1.dat 3908701 fichero1.dat $ ls -i fichero2.dat 3908701 fichero2.dat
  • 22. cp -al origen destino
  • 23. Todo junto • rsync -v --delete -a servidor:/mis_datos /backup cp -al /backup/mis_datos /snapshots/snapshot-`date -I` X X
  • 24. Harwdare Cisco/Linksys NSLU2: Intel XScale IXP420, 266 MHz, 8MB flash, 32MB SDRAM, Ethernet, 2 puertos USB 2
  • 25.
  • 26.
  • 27.
  • 28. Unslung • $ ssh -l root 192.168.1.78 Welcome to Unslung V2.3R63-uNSLUng-6.8-beta ---------- NOTE: THIS SYSTEM IS CURRENTLY UNSLUNG ---------- BusyBox v0.60.4 (2005.03.22-06:52+0000) Built-in shell (ash) Enter 'help' for a list of built-in commands. # df Filesystem 1k-blocks Used Available Use% Mounted on rootfs 240125792 75010680 162675564 32% / /dev/sdb1 6528 6332 196 97% /initrd /dev/sdb1 240125792 75010680 162675564 32% / /dev/sda1 307426936 223085068 81218592 73% /share/flash/data /dev/sdb1 240125792 75010680 162675564 32% /share/hdd/data /dev/sdb2 116661 4155 111302 4% /share/hdd/conf /dev/sdb2 116661 4155 111302 4% /share/flash/conf
  • 29. Unslung: ipkg • # ipkg list abook - 0.5.6-1 - Abook is a text-based addressbook program designed ... adduser - 1.1.3-9 - a multi-call binary for login and user account administration adns - 1.3-2 - Asynchronous resolver library and DNS resolver utilities. alac-decoder - 0.1.0-2 - A decoder for the apple lossless file format ... asterisk - 1.2.14-3 - Open Source VoIP PBX System ... rsync - 2.6.9-2 - fast remote file copy program (like rcp) ... zoo - 2.10-1 - zoo - File archiving utility with compression zsh - 4.2.6-3 - Zsh is a shell designed for interactive use.
  • 30. Unslung: ipkg • # ipkg info rsync Package: rsync Version: 2.6.9-2 Status: install user installed Section: net Architecture: armeb maintainer: NSLU2 Linux <nslu2-linux@yahoogroups.com> MD5Sum: 4a7310cefe3d43ab5e6bd49577cdd057 Size: 200677 Filename: rsync_2.6.9-2_armeb.ipk Source: http://www.samba.org/ftp/rsync/rsync-2.6.9.tar.gz Description: fast remote file copy program (like rcp) # ipkg install rsync # ipkg install bash
  • 36.
  • 37. Ejemplo de uso • import flickr import BitBucket import urllib me = flickr.people_findByUsername(quot;svetquot;) bucket = BitBucket.BitBucket(quot;svet-flickrquot;) page = 1 total_f = found_f = 0 while 1: try: photos = flickr.people_getPublicPhotos(me.id, 1000, page) for photo in photos: total_f = total_f + 1 if bucket.has_key(quot;%s-%squot; % (photo.title, photo.id)): pass # ok, ya la tenemos else: data = urllib.urlretrieve(quot;http://static.flickr.com/%s/%s_%s_o.jpgquot; % (photo.server, photo.id, photo.secret), quot;flickr.jpgquot;) bits = BitBucket.Bits(filename=quot;flickr.jpgquot;) bucket[quot;%s-%squot; % (photo.title, photo.id)] = bits print quot;saving %squot; % photo.title found_f = found_f + 1 page = page + 1 except AttributeError: break # bucket vacío print quot;Encontradas %s fotos, guardadas %s nuevasquot; % (total_f, found_f)
  • 38. Refrencias • http://www.nslu2-linux.org/ • http://samba.anu.edu.au/rsync/ • http://aws.amazon.com • http://www.mikerubel.org/computers/rsync_snapshots/ • http://www.postneo.com/2006/03/22/