Backup over iSCSI

146 views
Skip to first unread message

Jelle Langbroek

unread,
Feb 6, 2015, 5:16:57 AM2/6/15
to neths...@googlegroups.com

Hi,

I'd like to know what the best approach is for backing up directly over iSCSI. The frontend only gives me USB, SMB and NFS. Is there an easy way to be able to use a 'local' folder (iSCSI) on the server as backup? Thanks.

Best,

Jelle

 

 

Filippo Carletti

unread,
Feb 6, 2015, 9:16:57 AM2/6/15
to Jelle Langbroek, neths...@googlegroups.com
> I'd like to know what the best approach is for backing up directly over
> iSCSI. The frontend only gives me USB, SMB and NFS. Is there an easy way to
> be able to use a 'local' folder (iSCSI) on the server as backup? Thanks.

I think you could add an action to mount the iscsi target instead of
an usb disk (you could see an iscsi target as similar to an usb disk,
i.e. you should partition and format it, mount, copy files and
umount).

I'll try to simplify steps needed:
cp /etc/e-smith/events/actions/mount-usb /etc/e-smith/events/actions/mount-iscsi
line 42 change usb to iscsi
around line 60 add commands to activate iscsi target
ln -sf /etc/e-smith/events/actions/mount-iscsi
/etc/e-smith/events/pre-backup-data/S10mount-iscsi
config setprop backup-data VFSType iscsi

I could setup a test env next week, please let me know if you need further help.
Maybe we could file an issue for a new feature request.


--
Ciao,
Filippo

Jelle Langbroek

unread,
Feb 6, 2015, 2:26:32 PM2/6/15
to neths...@googlegroups.com

Hi,

Thanks for your reply. I'll try that out this weekend and post back.

One more question (a bit) related to this. I didn't read anything about mysql backups in the http://docs.nethserver.org/en/latest/backup.html page. Since roundcube is storing data there, are the databases included in the backup? Thanks again!

Best,

Jelle

Filippo Carletti

unread,
Feb 7, 2015, 5:48:13 AM2/7/15
to Jelle Langbroek, neths...@googlegroups.com
> Thanks for your reply. I'll try that out this weekend and post back.

Thanks. I can't write server-manager panels, but I think that adding
an iSCSI option isn't that hard.

> One more question (a bit) related to this. I didn't read anything about
> mysql backups in the http://docs.nethserver.org/en/latest/backup.html page.

All mysql databases are dumped before backup data (event
pre-backup-data) and imported after a restore.
So, as an example, if you have installed a LAMP website that uses
mysql you'll have its data saved in the backup automatically.


--
Ciao,
Filippo

Jelle Langbroek

unread,
Feb 8, 2015, 12:31:11 PM2/8/15
to neths...@googlegroups.com
Hi,

Tried getting it to run with only the mount-usb config changed, as you said. I found a few additions to that.

Difference of iSCSI with USB is that there's no LABEL. Have to use UUID of logged in iSCSI device.
Example (in mount-iscsi):

48: my $device = qx( /sbin/blkid -u filesystem -U c3846d38-a36c-4462-b571-1ae1d1f307bd );
-> But the UUID has to be hardcoded in the config, that's not desireable I guess. Do you have a solution?

There's also a check on VFSType in these files where iscsi needs to be added as a valid type:

if ( ($VFSType eq 'usb') || ($VFSType eq 'nfs') || ($VFSType eq 'cifs') || ($VFSType eq 'iscsi')) {

Set in:
- backup-data-duplicity
- cleanup-data-duplicity
- restore-config-duplicity
- restore-data-duplicity

That made it work! :)

Would be nice to have this available in the management-dashboard of course. Haven't looked into that yet.


ps: Mounting options in the script (around line 60) for USB are fine for iSCSI too. iSCSI logs into the target first and creates a /dev/sdX, so that's the same for USB. After that it only needs mounting, but that can happen the same way.

Best regards,
Jelle

Filippo Carletti

unread,
Feb 9, 2015, 9:22:42 AM2/9/15
to Jelle Langbroek, neths...@googlegroups.com
Great job, thank you.
You reminded me that the detection and mount of usb devices needs to
be rewritten for NethServer 7 (based on CentOS 7).
We have to keep in mind iSCSI when we'll rewrite it.
I've opened an issue:
http://dev.nethserver.org/issues/3027
> --
> You received this message because you are subscribed to the Google Groups "NethServer" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to nethserver+...@googlegroups.com.
> To post to this group, send an email to neths...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/nethserver/782b26f8ff13cbc6ec25587e048f2427%40wolk.orkz.nl.
> For more options, visit https://groups.google.com/d/optout.



--
Ciao,
Filippo

Giacomo Sanchietti

unread,
Feb 11, 2015, 2:22:37 AM2/11/15
to neths...@googlegroups.com
Hi,
thank you for you're feedback.

> There's also a check on VFSType in these files where iscsi needs to be added as a valid type:
>
> if ( ($VFSType eq 'usb') || ($VFSType eq 'nfs') || ($VFSType eq 'cifs') || ($VFSType eq 'iscsi')) {

I've just opened a new issue about it: http://dev.nethserver.org/issues/3032

But I would like to point out my idea on backup over iSCSI.
Why you do not let the system to handle the iSCSI target? You should
simply enable iscsid and iscsi services after the first login to the
target. Then at each boot, the system will take care to mount the block
device.

It seems much simpler to me :)


Giacomo
Reply all
Reply to author
Forward
0 new messages