Page 1 of 1

Backups using Linux bash scripts

PostPosted: Fri Feb 08, 2013 4:36 pm
by George
Hi, all.
I have several Linux distros spread over three disks that I backup using
bash scripts. The target drive (containing the backups) is in an
external enclosure that is hooked up to my PC using an eSATA connection.
Normally, that drive is powered off. But when I want to run backups,
I turn it on at boot time and using BIBM, boot a Linux distro (a tweaked
Puppy Linux right now) that has IFL installed in it.
Occasionally, when I turn on the external drive, my BIOS rearranges the
hard drive order so the drive order is not predictable. Using the blkid
and 'findfs UUID=' commands, I can identify the correct device name
(like /dev/sdb5) of a desired partition. Here lies my problem.
Looking at the IFL manual, I can specify the source drive using the
--d:/dev/xxx@p parameter. I can strip out the /dev/sdb portion of the
device ID but how do I get the partition ID / volume ID (the @p stuff
just mentioned?) I can use the manual IFL GUI and visually get the
numbers from the screen but I would like to script the whole process.
Stating the source partition as /dev/sdb5, for example, would nail the
desired volume but IFL doesn't like that format.
Is there another bash command that gets me the 2 or 4 character
partition/volume ID so I can build the imagel command line? Or better
yet, (this is for you, TBU :-) ) can the Linux use of –d:/dev/xxx be
modified to include the volume number (like /dev/sdb5) instead of having
to use the @p parameter?
I want to use this script so I can do full monthly backups and periodic
differential backups in “fire and forget” mode.
Thanks for putting up with this long message. Hopefully, the answer is
short and sweet and within the confines of bash.
All the best,
George
--
There are 10 kinds of people in the world,
Those who understand binary,
and those who don't.

Re: Backups using Linux bash scripts

PostPosted: Fri Feb 08, 2013 6:14 pm
by TeraByte Support(PP)
Using the -l (List) option will list the ID values. You can just use the list or get more details by including the --all option. For example: ./imagel -l --all
Output can be redirected to a file if not displayed in the terminal: ./imagel -l --all > partitions.txt
(You can also use the --stdout option.)

The ID values shouldn't change due to the drive order changing.

Have you tried using the #ntsig to specify the drive? If that works you wouldn't have to mess with the Linux /dev values. For example: ./imagel -b --d:#0x0000DF02@0x80 --f:backup.tbi

Re: Backups using Linux bash scripts

PostPosted: Fri Feb 08, 2013 8:35 pm
by George
Thanks, Paul, for your advice. I wondered about #NTSig not knowing much
about it. Previously, I had confused it with the UUID. Your examples set
me straight on this one. I plan to incorporate your #NTsig suggestion
into my scripts, full and differential backups for both Windows and
Linux partitions.
For the rest of you, when I run my scripts, all the other partitions /
volumes are nothing but static data so backups are reasonably fast.
Locking is not required.
Thanks again for your helpful suggestions.
George

There are 10 kinds of people in the world,
Those who understand binary,
and those who don't.