rsync --delete is dangerous!

I hosed my entire home directory on this server last night with an incorrect rsync command. I tried syncing my svn repository to the server like this:

rsync -az -e ssh --delete /var/svn/repos/ servername:/home/username/

The problem is that I had an extra slash on the end of "/var/svn/repos/". Without the extra slash, it would create a directory called repos inside servername:/home/username and sync it with /var/svn/repos. With the slash, it syncs the contents of "/var/svn/repos" with the contents of servername:/home/username, thus causing all files in servername:/home/username to be deleted because of the --deleted command.

What I could have done instead is create a directory on the remote server called repos and then rsync like this (actually you don't need to create repos first):

rsync -az -e ssh --delete /var/svn/repos/ servername:/home/username/repos

Or I could have done this:

rsync -az -e ssh --delete /var/svn/repos servername:/home/username

The last command will create a directory called repos in servername:/home/username and it will sync it but not delete anything in servername:/home/username. Add a trailing slah to /var/svn/repos and it will!

Luckily I had a nightly backup of my entire home directory on my local server's external backup drive. I was worried because although I make these nightly backups I haven't actually inspected them in a while. Fortunately everything was intact.

Tags: 

Comments

Hi David,

I was wondering what's the best command that I should use if I want to syncronize a filesystem called /zsync to another filesystem in other server called /zsync?A suggestion would much appreciated.Thanks in advance.

Tarmizee

Use the "-n print what will be done, but do nothing" switch, and stop wheening around !

-n, --dry-run
This makes rsync perform a trial run that doesn't make any changes (and produces mostly the same output as a real run). It is most commonly used in combination with the -v, --verbose and/or -i, --itemize-changes options to see what an rsync command is going to do before one actually runs it.

monster beats canada
monster beats sale
cheap monster beats
monster beats by dre
true religion jeans usa
beats by dre
true religion jeans sale usa
true religion jeans outlet usa
beats by dr dre
true religion jeans usa online
cheap true religion jeans usa
Meizitang Abnehmen Kapseln
meizitang soft gel
Meizitang Kapseln
Meizitang Erfahrungen
meizitang soft gel online
Meizitang Schlankheitspillen Kaufen
Meizitang Kaufen
Meizitang Schlankheitspillen
Abnehmen Kapseln
Schlankheitspillen Kaufen
Meizitang Deutschland
Meizitang Online Store
Meizitang Kapseln Kaufen
Comprar Meizitang soft gel
Meizitang Kapseln Bestellen
meizitang gel kapseln
meizitang gel kapseln kaufen
meizitang gel kapseln bestellen
venta meizitang
meizitang comprar
pastillas chinas meizitang
Meizitang soft gel pílulas de dieta
pastillas chinas meizitang originales
Meizitang Soft gel
pastillas chinas meizitang donde comprar
meizitang capsulas rojas
meizitang capsulas
Meizitang em portugal
meizitang capsulas chinas
meizitang capsulas adelgazantes
meizitang efectos adversos
meizitang efectos secundarios
Comprar Meizitang soft gel
meizitang mexico
meizitang botanical slimming mercadolibre
Meizitang soft gel barato
meizitang pelangsing terlaris di dunia
ciri-ciri meizitang strong asli
meizitang botanical slimming testimonios
meizitang botanical slimming funciona
meizitang botanical slimming precio
Botanical Slimming Meizitang
meizitang citrus
meizitang citrus original
meizitang citrus sirven
meizitang uk
meizitang soft gel uk
meizitang strong version uk
meizitang
meizitang botanical slimming uk
meizitang diet pills uk
meizitang reviews
meizitang side effects
what is meizitang
meizitang ebay
meizitang botanical slimming amazon
meizitang italia
dimagrimento meizitang
Meizitang botanical dimagrante
Meizitang Soft Gel
Meizitang Strong Version
Ordinare capsole Meizitang soft gel
Comprare Meizitang
Promozione Meizitang Gel
Meizitang
Recenzione di Meizitang
replica watches south africa
cheap replica watches south africa
replica watches sale south africa
replica watches online south africa
replica watches outlet
replica watches online store
replica rolex watches
replica breitling watches
replica cartier watches
replica chanel watches
replica gucci watches
replica hublot watches
replica iwc watches
replica louis vuitton watches
replica panerai watches
replica patek philippe watches
replica tag heuer watches
replica tissot watches
meizitang
meizitang france
meizitang avis
Meizitang en ligne
Acheter Meizitang
Meizitang Soft Gel
Meizitang botaniques minceur
meizitang version forte
Meizitang Capsules
Meizitang měkké gelové kapsle
měkké gelové kapsle
zeštíhlující Meizitang koupit
Tablety na hubnutí Meizitang
Meizitang Soft Gel prodej
Meizitang Soft gel
Koupit gelové kapsle Meizitang
Botanická hubnutí Meizitang
Meizitang Sverige
Meizitang Soft Gel
viktminskning piller
Meizitang köp
Meizitang pris
gå ner i vikt
Meizitang
bantningspiller
Köpa Meizitang
Meizitang online
Meizitang Polska
Meizitang Czerwony
Meizitang Soft Gel
Meizitang Soft Gel Oryginalny
odchudzanie Meizitang
Tabletki Meizitang
Meizitang Soft Gel UK
Meizitang UK Suppliers
Meizitang Strong Version UK
Meizitang UK Reviews
Meizitang Botanical Slimming UK
Meizitang Botanical Slimming Capsules
Meizitang Capsules Side Effects
Meizitang UK Sale
Buy Meizitang UK
Meizitang Capsules UK
Cheap Viagra UK
Viagra UK Online
Buy Viagra UK
replica watches ireland
replica watches ireland online
replica watches sale ireland
replica watches ireland outlet
cheap replica watches ireland
cheap replica swiss watches ireland
swiss replica watches ireland
replica watches singapore
cheap replica watches singapore
replica watches singapore facebook
replica watches singapore rolex
replica watches singapore forum
replica watches sale singapore
buy replica watches singapore
swiss replica watches singapore
repair replica watches singapore
replica watches nz
swiss replica watches new zealand
replica watches new zealand
replica rolex watches nz
omega replica watches nz
cheap replica watches nz
replica watches sale nz
replica watches nz online
replica watches outlet nz
christian louboutin ireland
christian louboutin sale ireland
christian louboutin outlet ireland
cheap christian louboutin ireland
christian louboutin shoes ireland
christian louboutin shoes sale ireland
christian louboutin shoes outlet ireland
cheap christian louboutin shoes ireland
Meizitang Gel Kapseln
Meizitang Gel Kapseln Kaufen
Meizitang Kapseln Kaufen
Meizitang Gel Kapseln Bestellen
Meizitang Kapseln Bestellen
meizitang erfahrung
Meizitang Kaufen
Meizitang Soft Gel
meizitang bestellen
bestellen meizitang soft gel
Originele Meizitang
meizitang soft gel dieetpillen
meizitang soft gel online
meizitang soft gel pillen
meizitang soft gel dieet
Meizitang kopen
meizitang uk
meizitang botanical slimming uk
meizitang soft gel uk
meizitang evolution uk
meizitang reviews
meizitang side effects
where to buy meizitang
meizitang softgel slimming capsule
louis vuitton nz
louis vuitton new zealand
louis vuitton auckland nz
louis vuitton queenstown nz
louis vuitton queenstown new zealand
louis vuitton bags nz
louis vuitton handbags nz
cheap louis vuitton nz
louis vuitton sale nz
louis vuitton outlet nz
chanel nz
chanel outlet nz
coco chanel sale nz
cheap chanel bags nz
chanel handbags new zealand
chanel 2.55 nz
chanel auckland online
chanel queenstown store
moncler jackets nz
cheap moncler jackets nz
moncler jackets new zealand sale
moncler womens jackets sale
moncler women's jackets online
moncler mens jackets outlet
moncler men's jackets auckland
moncler jackets queenstown nz
moncler nz store
ray ban nz
ray ban sunglasses nz
ray ban wayfarer nz
ray ban aviators nz
cheap ray ban nz
ray ban new zealand online
ray ban sunglasses sale
ray ban sunglasses nz outlet
burberry bags nz
burberry handbags new zealand
burberry scarf nz
burberry scarves nz
cheap burberry nz
burberry sale nz
burberry outlet nz
burberry new zealand online
michael kors singapore
cheap michael kors singapore
michael kors singapore sale
michael kors bags online
michael kors handbags outlet
michael kors bags singapore
michael kors handbags singapore
canada goose nz
canada goose jackets nz
cheap canada goose nz
canada goose new zealand
canada goose sale nz
canada goose jackets online
canada goose jackets outlet
cheap canada goose jackets nz
hermes nz
hermes bags nz
hermes handbags nz
cheap hermes nz
hermes nz online
hermes sale new zealand
hermes handbags outlet
cheap hermes bags nz
pandora nz
pandora charms nz
pandora beads nz
pandora jewellery nz
pandora jewelry new zealand
cheap pandora nz
pandora new zealand sale
pandora outlet nz
pandora nz online
Meizitang South Africa
Meizitang
Meizitang Botanical Slimming
Meizitang Capsules
Meizitang Soft Gel
Meizitang Botanical Slimming Soft Gel South Africa
mulberry nz
mulberry handbags nz
mulberry bags new zealand
cheap mulberry nz
mulberry new zealand sale
mulberry bags online nz
mulberry outlet new zealand
Meizitang
Meizitang 植物のソフト痩身
Meizitang 植物ソフトジェル
Meizitang 植物ソフトジェルの通販
Meizitang Soft Gel
Meizitang Strong Version
漢方ダイエット薬
Meizitang Botanical Slimming
hermes uk
hermes uk online
cheap hermes uk
hermes bags uk sale
hermes handbags uk outlet
hermes birkin sale uk
cheap hermes kelly bags uk
monster beats nz
monster beats new zealand
beats by dre nz
beats by dr dre
monster headphones nz
monster earphones new zealand
beats by dre sale
cheap monster beats
chanel singapore sale
chanel outlet singapore
chanel singapore online
cheap chanel singapore
chanel bags singapore
chanel handbags singapore
coco chanel singapore
cheap chanel bags singapore
cheap chanel handbags singapore
Hermes Singapore
Hermes Bags Singapore
Hermes Handbags Singapore
Hermes Kelly Singapore
Hermes Birkin Singapore
Cheap Hermes Singapore
Hermes Sale Singapore
Hermes Outlet Singapore
Hermes Online Singapore
louis vuitton ireland
louis vuitton ireland online
louis vuitton bags ireland
louis vuitton handbags ireland
cheap louis vuitton ireland
louis vuitton sale ireland
louis vuitton outlet ireland
chanel ireland
cheap chanel ireland
chanel ireland online
chanel sale ireland
chanel ireland outlet
chanel bags ireland
chanel handbags ireland
Tiffany and Co NZ
Tiffany Jewellery NZ
Tiffany & Co NZ
Cheap Tiffany Jewelry NZ
Tiffany NZ Outlet
Tiffany New Zealand Online
Tiffany Sale New Zealand
monster beats australia
monster beats by dre
monster beats dr dre
monster beats by dr
beats by dre
beats dr dre
beats by dr dre
tiffany singapore
tiffany and co singapore
tiffany & co singapore
tiffany jewellery singapore
cheap tiffany jewelry singapore
tiffany sale singapore
tiffany jewellery outlet singapore
tiffany singapore online
meizitang norge
meizitang
meizitang soft gel
Meizitang Soft Gel billig
Kjøp meizitang Soft Gel
Meizitang Botanisk Slanking
Meizitang soft gel pa nett
tiffany australia
tiffany and co australia
tiffany & co australia
tiffany jewellery australia
cheap tiffany jewelry australia
tiffany online australia
tiffany australia outlet
tiffany australia sale
replica watches australia
replica watches australia online
cheap replica watches australia
replica watches sale australia
replica watches outlet australia
cheap replica swiss watches
cheap swiss replica watches
meizitang
meizitang bestellen
meizitang kaufen
meizitang botanische abnehmen
meizitang günstig bestellen
meizitang soft gel kaufen
meizitang gel erfahrungen
meizitang soft gel
meizitang australia
meizitang capsules australia
meizitang strong version australia
meizitang botanical slimming australia
meizitang soft gel australia
meizitang botanical slimming soft gel
meizitang soft gels australia
gucci bags australia
gucci handbags australia
gucci australia
cheap gucci australia
gucci bags sale australia
gucci handbags online australia
gucci outlet australia
gucci bags sydney
gucci handbags melbourne
coach bags australia
coach handbags australia
coach sale australia
coach outlet australia
cheap coach australia
coach australia online
cheap coach bags australia
cheap coach handbags australia
hermes bags australia
hermes handbags australia
cheap hermes australia
hermes australia online
hermes outlet australia
hermes bags sale australia
hermes handbags sydney
hermes melbourne store
canada goose jackets australia
cheap canada goose australia
canada goose sale australia
canada goose outlet australia
canada goose australia online
cheap canada goose jackets
canada goose jackets sale
canada goose jackets outlet
barbour jackets australia
cheap barbour australia
barbour sale australia
barbour australia outlet
barbour australia online
cheap barbour jackets australia
nike shoes nz
nike air max 90 nz
nike air jordan nz
cheap nike shoes
nike shoes sale
nike air max online
nike air max 90 outlet
nike shoes new zealand
barbour nz
barbour jackets nz
cheap barbour jackets
barbour jackets sale
barbour jackets outlet
barbour jackets online
barbour jackets auckland
barbour jackets wellington
gucci bags nz
gucci handbags nz
gucci new zealand
cheap gucci bags
gucci handbags sale
gucci bags online
gucci handbags outlet
true religion nz
true religion jeans nz
true religion new zealand
cheap true religion jeans nz
true religion sale nz
true religion outlet nz
true religion online store
true religion jeans outlet
moncler australia
moncler australia sale
moncler australia outlet
moncler australia online
cheap moncler australia
moncler jackets australia
moncler jackets australia sale
moncler jackets australia outlet
moncler jackets australia online
cheap moncler jackets australia
burberry bags singapore
burberry handbags singapore
burberry scarf singapore
burberry scarves singapore
burberry singapore
cheap burberry singapore
burberry singapore online
burberry singapore sale
burberry outlet singapore
ralph lauren polo australia
ralph lauren polo shirts australia
cheap ralph lauren polo
ralph lauren polo sale
ralph lauren shirts online
ralph lauren outlet australia
ralph lauren polo sydney
ralph lauren polo shirts melbourne
burberry bags uk
burberry handbags uk
burberry scarf uk
burberry scarves uk
cheap burberry uk
burberry uk sale
burberry uk online
burberry outlet uk
designer sunglasses 2018
designer sunglasses australia
designer sunglasses sale australia
designer sunglasses outlet australia
designer sunglasses australia online
cheap designer sunglasses australia
designer sunglasses sydney
cheap sunglasses sydney
sunglasses sydney sale
sunglasses outlet sydney
mulberry bags australia
mulberry handbags australia
cheap mulberry handbags australia
mulberry sale australia
mulberry outlet australia
cheap mulberry bags australia
mulberry australia online
cheap mulberry australia
replica watches australia
cheap replica watches australia
replica watches sale australia
replica watches outlet australia
replica watches online australia
replica swiss watches australia
cheap replica swiss watches
swiss replica watches australia
cheap swiss replica watches
burberry australia
burberry sale australia
burberry outlet australia
burberry australia online
cheap burberry australia
burberry bags australia
cheap burberry bags australia
burberry handbags australia
cheap burberry handbags australia
burberry scarf australia
burberry scarves australia
celine australia
celine sale australia
celine outlet australia
celine australia online
cheap celine australia
cheap celine handbags australia
celine handbags australia
cheap celine bags australia
celine bags australia
celine bags sydney
celine handbags melbourne
nike shoes australia
cheap nike shoes
nike shoes sale
nike shoes outlet
cheap nike shoes australia
nike air max australia
nike air max 90 australia
nike free run australia
nike shoes online
nike outlet
michael kors australia
michael kors sale australia
michael kors outlet australia
michael kors australia online
cheap michael kors australia
cheap michael kors bags australia
michael kors bags australia
michael kors handbags australia
cheap michael kors handbags australia
christian louboutin australia
christian louboutin sale australia
christian louboutin outlet australia
christian louboutin australia online
cheap christian louboutin australia
cheap christian louboutin shoes australia
christian louboutin shoes australia
christian louboutin shoes outlet
christian louboutin shoes sale
louis vuitton australia
louis vuitton australia sale
louis vuitton australia online
louis vuitton outlet australia
cheap louis vuitton australia
cheap louis vuitton bags australia
louis vuitton bags australia
louis vuitton handbags australia
cheap louis vuitton handbags australia
ray ban sunglasses nz
ray ban sale nz
ray ban nz outlet
ray ban nz online
cheap ray ban sunglasses
ray ban new zealand
cheap ray ban sunglasses nz
ray ban wayfarer nz
ray ban aviator nz
oakley sunglasses nz
cheap oakley sunglasses nz
oakley sunglasses online
oakley sunglasses sale
oakley sunglasses outlet
oakley sunglasses new zealand
oakley nz
cheap oakley nz
oakley nz outlet
oakley nz online
oakley sale nz

I have express a few of the articles on your website now, and I really like your style of blogging.

fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free
fifa 18 coin generator hack free

Add new comment