Can you make a RAID-1 setup with a HDD and USB stick?

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

Can you make a RAID-1 setup with a HDD and USB stick?

#1 Post by tallboy »

We all remember to backup our work every day, don't we?
Huh, you don't?? :shock:
Well, neither do I. I was very good at remembering that, uhhh, for a while, but it has a tendency to be more and more sporadic. :?
So, I wonder if I can add a USB-stick to a PC, and make it act as a drive in a RAID-1 setup? RAID-1 is when you save everything identical to 2 drives, so that a failure in one disc, leaves you with a complete copy on another disc. That would mean that I always have a copy of the HDD.
Or, maybe there are simpler ways to achieve the same result; a backup?
True freedom is a live Puppy on a multisession CD/DVD.

enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

#2 Post by enrique »

I do not want to be rude but all this methods do not work in practice.

I mean raid have a use when your goal is to make a HDD write faster on servers. It did work but now we have SSD.

RAID-1 I guess is a nice concept. But just give it some thoughts. Lets say you have such a system. What will stop your Puppy OS to keep writing Identically broken Files? You will only have twice the same broken file. That ONLY work for Hardware Failure if only one of the HDD fail to write.

Now you IDEA is not crazy at all. I guess we could write a script to C&P a backup of your save file somewhere in our Local Network or Clowd. Giving it a date and time on the name so that multiple copies can be save. Interesting option I will like it myself. Best is to make the copy once we are working so that Boot-up and Shutdown process time do not get affected.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#3 Post by bigpup »

Maybe just schedule a set time to do a backup of the save.

This was one way to do it:
http://www.murga-linux.com/puppy/viewtopic.php?t=71976
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#4 Post by jafadmin »

Raid only protects against hardware failure, not incidental data loss/corruption.

p310don
Posts: 1492
Joined: Tue 19 May 2009, 23:11
Location: Brisbane, Australia

#5 Post by p310don »

I don't know. I thought for RAID to work you needed two of the same disk, cancelling out your idea. I could easily be wrong.

What are you backing up? If you're backing up a hard drive, IMHO get another hard drive. If you're backing up a save file, eg a few hundred MB or maybe 1 or 2 gig, a USB drive will do the job. Or, back up to a cloud service, eg google drive.

I have a system at work where I back up 8 gig (10000s of files) from an old XP machine to Puppy, then compress it down to 2gig tar.gz file, then all staff back that up to their own USB daily, and then that tar.gz also gets uploaded to my google drive automatically every evening. Total time from starting to copy, to compressing, to USB transfer, to cloud upload takes about 35 minutes.

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#6 Post by tallboy »

Thank you for the feedback.
p310don wrote:I don't know. I thought for RAID to work you needed two of the same disk, cancelling out your idea. I could easily be wrong.
That was my impression too, but I wanted to hear other user's thoughts about it.
My idea was to have a USB stick attached at all times, and ideally have automated saves with a date and time reference, as enrique points out. I think I have read about a similar solution in one of the 'dogs'. The RAID-1 is an example of a possible solution.
As indicated in my signature, I have previously booted from a multisession CD or DVD. A serious mistake could easy be rectified by simply rebooting, and if the mistake happened to be saved, I could always omit the latest save from being read in the bootup process.
And yes, you can do that with a frugal setup too, but it seems that some mistakes cannot be undone. I have tested different Rox setups, and it unfortunately led to problems with starting X after bootup. I did not save before shutdown, after seeing that I made a booboo, but I cannot find and undo my mistake.

BTW, the use of a USB stick would make it very easy to sync files between several PCs.
True freedom is a live Puppy on a multisession CD/DVD.

enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

#7 Post by enrique »

p310don nice testimony. I am inspired. See we too can do it,

bigpup suggestion on backup_pupsave using Pschedule. A 10 year old solution that could work too,

Now I identify my self with tallboy. In fact he is not looking for a backup solution. He just had a bad Puppy Save that made him lost some files. And he is trying not to let it happen again.

So we could get inspiration from bigpup suggestion of backup_pupsave. Modify it to use it as a Special Shutdown+ procedure.
*Follow all normal procedures for shutdown
*We then make sure PuppySave had been saved.
*Then do the Copy and rename with time/date.
*Finally allow the Halt and Poweroff.

We can have Counter to keep only the last N PuppySaves. Or even have logic to Upload 1 daily or weekly to a local drive.

I be looking soon into this, this is one I love to have.

======================================
PD.
I do use a 2GB Puppy Save. If I need more space I do a Remaster, then create a new empty 2GB Puppy Save. And start all over again. In general this works for me because all I do consumes very little space. My Normal save on shutdown is about 100-200MB.

Here is an alternative.
Once a week I save a full Puppy Save. Then on each shutdown I will backup only the last incremental save. This will save me space and time as It will only require to copy the last 100-200MB per shutdown.

But this method will require me to understand the full method use in BusterDog save of changes.dat changes.dat is the DebianDog equivalent of PuppySave.

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#8 Post by tallboy »

enrique wrote:Here is an alternative.
Once a week I save a full Puppy Save...etc..
Haha, I started to do backups after every session, then every week, then only now and then, nowadays only when I remember my previous mistakes... :?
True freedom is a live Puppy on a multisession CD/DVD.

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

#9 Post by mikeslr »

tallboy wrote:
enrique wrote:Here is an alternative.
Once a week I save a full Puppy Save...etc..
Haha, I started to do backups after every session, then every week, then only now and then, nowadays only when I remember my previous mistakes... :?
That's the genius of bigpup's suggestion: use pschedule. You only have to remember to do set it up once. FWIW, Bionicpup64 has both pschedule and Pupsave Backup builtin. Being essentially scripts, I'm pretty sure they can be added to almost all Puppies.

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#10 Post by tallboy »

My tahr64_6.0.6 have these installed:
GAdmin-Rsync remote backup
PBackup Backup and sync
Pmirror backup a directory
Pudd copy drive/partition
Pupsave backup
True freedom is a live Puppy on a multisession CD/DVD.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#11 Post by Mike Walsh »

@Olaf/all:-

God, yes....I'm another one. :oops: In the early days, backups were fastidiously carried-out with great frequency. Then it got to once a week.....then once a month.....and now I'm lucky if I remember to perform the darned things at all.

On top of that, there's the issue of needing to remember to do this with multiple Pups, on a regular basis, even when I'm not actually running them. (It's literally a case of "eeny, meeny, miny, mo" as to which Puppy I decide to use for the day. Seriously! :lol: )

Question for y'all, boys & girls. Which is recommended for backing-up, in your opinion? PBackup (Backup & Sync), or Pupsave Backup? And am I right in thinking these can be set to work from pSchedule?

Normally, it's the save-folder I backup most frequently (preferably once a week), but I want to periodically back-up each Pup's entire /mnt/home sub-directory.....say, once a month.

I may even end up scripting something for this myself.

Uncle Mike would greatly appreciate some recommendations, boys & girls....


Mike. :wink:

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#12 Post by jafadmin »

My approach is to backup a gzipped image of the disk:

Code: Select all

#!/bin/sh
# 
# Image backup the drive we booted from to location
# 
MyName=$(echo $0 | rev | cut -d '/' -f1 | rev)
if (( $# != 1 )); then

    printf "\n\tUsage: $MyName </path/to/storage/location>\n"
    printf "\n\tEx:  $MyName /mnt/sdc1/backups\n\n"
    exit 1
fi

if [ ! -d $1 ]; then

    printf "\n\t\"%s\" does not exist. Exiting ..\n\n", $1
    exit 1
fi

BootDev=$(cat /etc/rc.d/PUPSTATE | grep PDEV1 | cut -d\' -f2 | cut -b 1-3)
DiskSize=$(fdisk -l /dev/$BootDev | grep Disk -m1 | cut -d' ' -f5)
DiskGigs=$(( $DiskSize / 1000000000 ))

printf "\n\tBackup in process. Please be patient ..\n\n"

# backup:
dd bs=4M if=/dev/$BootDev | gzip > $1/$(hostname)-$BootDev-"$DiskGigs"GB.img.gz

printf "\n\tBackup complete!\n\n"

# restore:
#gzip -d -c Machinename-sd?-##GB.img.gz | dd bs=4M of=/dev/sd?<disk device of your chocice>

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#13 Post by bigpup »

Pbackup
If it can still do all it is suppose to be able to do.
Check out it's topic
http://murga-linux.com/puppy/viewtopic.php?t=10975

The download link in the topic is dead.
Here is the link to the pet of Pbackup
http://distro.ibiblio.org/puppylinux/pe ... -3.1.9.pet
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

Post Reply