You are not logged in.

#1 2013-11-25 20:08:12

xpaolo
Member
From: Spresiano (TV) - Italy
Registered: 2009-09-11
Posts: 17
Website

backup and data loss

Hi all
I have a desktop PC with 3 drives , 2 of 320 GB on LVM with striping and 1 of 1TB standard.I use the 1 TB disk only for backup. I wanted to redesign my storage architecture so i copied the content of my root and home partition in 2 separate directories in the backup drive. After recreated my root and home logical volumes i restored the data from the backup and i found that the root partition was ok BUT the home contains ONLY the directories without a file ! There are ALL the directories BUT nothing else, i loose all my emails, pictures, documents, etc. I still don't understand what happened. I copied the 2 partitions in the same way, as root using mc but i can restore only the root.
Anyone can help me to understand what was the problem ? How could this happened ?
At least for avoid another big mistake like this and prevent it from happening again

Offline

#2 2013-11-25 20:26:11

karol
Archivist
Registered: 2009-05-06
Posts: 25,430

Re: backup and data loss

Tell us how exactly did you backup and restore, what commands did you use.

Offline

#3 2013-11-25 20:31:19

xpaolo
Member
From: Spresiano (TV) - Italy
Registered: 2009-09-11
Posts: 17
Website

Re: backup and data loss

karol wrote:

Tell us how exactly did you backup and restore, what commands did you use.

I have only one user 'paolo' so i mounted on /backup my 1TB disk /dev/sdg1 and via mc (GNU Midnight Commander) i selected /home/paolo on the left panel and /backup on the righe panel and than pressed F5.

Very simple and i never had a problem before

Offline

#4 2013-11-26 03:52:11

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: backup and data loss

This is a serious suggestion: the biggest mistake you made was to not check the backup before proceeding. Not even the most superficial check. For example, you could have checked for space usage on the source and target or you could have just viewed some of the files randomly. Even a minimal check would have  caught this sort of data loss.

The reason I say this is because figuring out what error you made is useful, but we all make errors all of the time. So thinking that next time you won't make an error is just wishful thinking. (You may not make *that* error if this experience is sufficiently traumatic, but there are lots of other errors left to make.) So you need a solution which accepts that you will screw up and tries to compensate for that as well as is possible. Checking the backup yourself, in addition to whatever else, gives you a minimal level of insurance but it is enough to catch many of the biggest mistakes.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#5 2013-11-26 06:01:18

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,117

Re: backup and data loss

I hate to say it, but unless there exist not less than two TESTED copies, at least one of which is off site, you do not have a backup.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

#6 2013-11-26 18:38:05

xpaolo
Member
From: Spresiano (TV) - Italy
Registered: 2009-09-11
Posts: 17
Website

Re: backup and data loss

cfr wrote:

This is a serious suggestion: the biggest mistake you made was to not check the backup before proceeding. Not even the most superficial check. For example, you could have checked for space usage on the source and target or you could have just viewed some of the files randomly. Even a minimal check would have  caught this sort of data loss.

The reason I say this is because figuring out what error you made is useful, but we all make errors all of the time. So thinking that next time you won't make an error is just wishful thinking. (You may not make *that* error if this experience is sufficiently traumatic, but there are lots of other errors left to make.) So you need a solution which accepts that you will screw up and tries to compensate for that as well as is possible. Checking the backup yourself, in addition to whatever else, gives you a minimal level of insurance but it is enough to catch many of the biggest mistakes.

I know already that was my mistake. I'm asking here how could this be happened. Coping /home/paolo took more then one hour so i though the copy was made correctly
My question is not how to do a backup BUT is how can i copy only the directories without files.

Offline

#7 2013-11-27 12:18:45

qinohe
Member
From: A Dutch location..)
Registered: 2012-06-20
Posts: 649

Re: backup and data loss

xpaolo wrote:

I know already that was my mistake. I'm asking here how could this be happened. Coping /home/paolo took more then one hour so i though the copy was made correctly
My question is not how to do a backup BUT is how can i copy only the directories without files.

You are right about copying a file in mc with F5, but no one here knows if that really happened, not even you.
We can't check if the cursor was pointing to the correct dir.
That is why you should use commands for tasks as important as this one, at least thats how I think about it.
Why?, commands show up in history, mouse or cursor moves don't.
And, NEVER think your backups work, know they work!, could be a lifesaver.


-I can give you a ladder, but you need to climb it yourself-

Offline

#8 2013-11-27 19:37:08

exos
Member
From: Buenos Aires, Argentina
Registered: 2009-11-09
Posts: 14
Website

Re: backup and data loss

This is not backup, you only copy over and over files.

You can use rysnc (this delete the deleted files to, and only copy the new or modified files, with a output):

$ rsync --av --delete /home/paolo /backup

But I recommend use backup ninja: https://aur.archlinux.org/packages/back … setlang=es

This is very easy to configure and works very well, with an history of changes.

I have a similar configuration, I have 3 disks (1TB, 2x 250GB), the 2x250GB in a mirroring raid (software) where I backup every days my home and others directories.


exos ~ Exodica's logs - exos@esfriki - PGP 0x8798902F - OTR - yvan eht nioj (¿?)

Offline

#9 2013-11-27 19:55:07

xpaolo
Member
From: Spresiano (TV) - Italy
Registered: 2009-09-11
Posts: 17
Website

Re: backup and data loss

Sorry but maybe i didn't explain well what is my problem.
I opened this thread not to learn how a good backup must be BUT to understand what happened in my situation.
I wanted to move around my disks my partitions so i 'parked' my home directory in one disk, reformat, recreate lvm vg, lv, etc. When i wanted to restore my home partition i found only directories without files.
I didn't think for this i need a backup, only copy and restore files.
And still the question is: how can one user copy only directories (thousands of directories) without files using mc's F5 command
Maybe a permission problem ?
I don't understand...

Anyway thank you all for you suggestions, i'm sure i will not do the same mistake in the future

Offline

#10 2013-11-27 22:19:59

fukawi2
Forum Moderator
From: .vic.au
Registered: 2007-09-28
Posts: 5,296
Website

Re: backup and data loss

xpaolo wrote:

I didn't think for this i need a backup, only copy and restore files.

That is a backup...

xpaolo wrote:

And still the question is: how can one user copy only directories (thousands of directories) without files using mc's F5 command

No-one here can tell - we don't have crystal balls.

xpaolo wrote:

Maybe a permission problem ?

Unlikely, you should have had an error if that happened.
Perhaps you didn't unmount the drive correctly?
Perhaps you pressed something other than F5. Since there's no logging in mc, no-one will ever know.
We could speculate for days on what *could* have happened, but there is no way we can ever know.

xpaolo wrote:

I opened this thread not to learn how a good backup must be BUT to understand what happened in my situation.

I think what people are trying to say is that we have no idea either -- we can't go back in time to look over your shoulder when you did what you said you did and debug it. While they say hindsight is 20/20, it's a common rule of backups that you MUST test them. A backup isn't a backup until it's tested/restored.

Offline

Board footer

Powered by FluxBB