Latest News:
2018-11-29: XigmaNAS 11.2.0.4.6229 - released!

We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS cost money, please consider a donation to our project so we can continue to offer you the best.
We need your support! eg: PAYPAL

Low Power Backup

Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
achaycock
NewUser
NewUser
Posts: 11
Joined: 10 Oct 2014 15:49
Status: Offline

Low Power Backup

#1

Post by achaycock » 19 Sep 2018 12:35

Hi everyone. I'm a long time user and lurker of the forums and I am looking for some advice on a scripting project.

My current setup uses two HP Microservers, a Gen 8 and a Gen 7, with the Gen 8 being my main NAS. What I want to do is backup the data on the Gen 8 to the Gen 7 - without having the Gen 7 on all the time.

For those interested the Gen 8 runs 4 x 4TB WD RED in a RAID Z2 configuration and the Gen 7 has a pair of mirrored 1TB drives, 2 x 3TB drives used as standalone (not striped together, but not mirrored) and a standalone 2TB used for PC backups. I also have 2 x 3TB drives that are used to take weekly backups and then moved to a friend's house for off-site. I realise the backup server has no real redundancy, but money is a thing, so I am using what I have.

What I want to do is write a script that powers up the Gen 7, waits until it boots up, mount the backup drives as NFS shares, run a snapshot style rsync and when completed shut the server down.

Now wakeonlan is the obvious answer to turning the server on, but how do I script a check on the Gen 7 to ensure that is has booted? I would like to check rather than simply time the bootup procedure just in case something causes the Gen 7 to take longer than normal to boot.

The mounting and unmounting of the shares along with the rsync script also doesn't overly concern me, as I have something already for that, but shutting the server down afterwards is something that I would like advice on. I'm not sure I want to script an ssh connection in for example, though I suppose that could be an option.

What do people think? Any ideas and advice?

User avatar
Snufkin
Advanced User
Advanced User
Posts: 238
Joined: 01 Jul 2012 11:27
Location: Etc/GMT-3 (BSD style)
Status: Offline

Re: Low Power Backup

#2

Post by Snufkin » 19 Sep 2018 14:04

I'd suggest pinging network interface.
If server replies then it's a clear sign boot sequence completed.
See ping exit codes
XNAS 11.2.0.4.6229 embedded, ASUS P5B-E, Intel DC E6600, 4 GB DDR2, 2 x HGST HDN726040ALE614, 2 x WDC WD5000AAKS, Ippon Back Power Pro 400

achaycock
NewUser
NewUser
Posts: 11
Joined: 10 Oct 2014 15:49
Status: Offline

Re: Low Power Backup

#3

Post by achaycock » 19 Sep 2018 14:42

I'm thinking I will do it this way:

FS01 = main NAS - HP Gen 8
FS02 = Backup Nas - HP Gen 7

FS01 send magic packet to FS02 to wake it up.
FS02 will mount the SAMBA shares read only from FS01
FS02 will run the rsync scripts.
Once complete, FS02 will issue the halt command and shutdown.

I reckon that makes it a simpler process to implement.

Post Reply

Return to “Do It Yourself Projects”