Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

LifePreserver replication issues #1434

Closed
danboid opened this issue May 30, 2017 · 16 comments
Closed

LifePreserver replication issues #1434

danboid opened this issue May 30, 2017 · 16 comments

Comments

@danboid
Copy link

danboid commented May 30, 2017

I run FreeBSD 11 on my home NAS so I want to use that to backup my TrueOS install via Lifepreserver but its not working for me.

First, I checked I could login as my normal user via SSH with a password. I had disabled SSH access with passwords on my FBSD box but I thought there was more chance of LP working if I just used passwords.

I created a new dataset on my FreeBSD server like so:

zfs create -o compress=lz4 data/sys/true76

then I set the ZFS permissions as covered in the TrueOS handbook:

zfs allow -u dan atime,canmount,clone,compression,create,destroy,hold,mount,mountpoint,promote,receive,rename,send,userprop data/sys/true76

I then opened LP on my TrueOS laptop and created a new replication target. It's at this point I'll highlight I'm not using a standard SSH port so that was entered along with the other details of my FreeBSD server. Then, when I click 'Start' - nothing happens. No errors, no warnings, no progress bars... nothing. Exactly the same happens if I click 'Initialize' - nothing at all.

If a connection cannot be establish when clicking 'Start', I expect a notification of some sort to alert me of the error, otherwise I would hope to see a progress bar or something somewhere to let me know a replication is underway. Clicking 'Initialize' should also print an error if the connection cannot be established and if it can, I would expect it to ask for my confirmation before it wipes a dataset / replication target.

@danboid
Copy link
Author

danboid commented Jun 6, 2017

Has anyone tried LP replication successfully recently?

@kmoore134
Copy link
Member

kmoore134 commented Jun 7, 2017 via email

@danboid
Copy link
Author

danboid commented Jun 7, 2017

Ah good - so I should be able to get this working if it works for you.

Do you see any mistakes in my config? The handbook only covers replicating to a FreeNAS box but I should be able to replicate to my ZFS-based FreeBSD 11 box, right?

Do you plan to add the notifications/warnings and error messages I suggested to LP / sysadm? Should I see a progress bar or some form of status when it is replicating?

Thanks

@danboid
Copy link
Author

danboid commented Jun 14, 2017

I should also mention that I do have a /var/log/lpreserver dir but it doesn't contain anything, even immediately after trying to replicate or initialize.

Does LP default to using SSH keys if you don't input a password when you add your target dataset?

@TonyBostonTB
Copy link

TonyBostonTB commented Jun 29, 2017

same issue here except, the other box is a freenas

@danboid
Copy link
Author

danboid commented Jul 8, 2017

Thanks to members of the discourse board, I think I understand LP a bit better now. There seems to be a few issues that need fixing here.

One thing I was unaware of, was the need to copy the private SSH key from the root users .ssh dir on the TrueOS box into the .ssh dir of the user you are backing up to on the server. Yes, LP depends on SSH keys and doesn't seem to offer any support for using SSH passwords. Seems really obvious now.

The original bug/missing feature here is that I was pushing 'Start' under the Replication tab of the LP GUI client, thinking this was how you would perform a first replication. Replication then snapshots, I expected. Turns out you have to create at least one snapshot before you can use replication so the user should be told this if they try to use replication before any snapshots have been created.

Looking at Fig 11.6.2 on:

https://sysadm.us/handbook/client/sysadmclient.html#life-preserver

It seems two main things are missing before we can use LP SSH restore:

1 - The ability to load a SSH key

2 - The ability to enter a dataset to restore from. I want to be able to backup multiple TrueOS installs to individual datasets on one ZFS based FreeBSD (or FreeNAS, or Linux ZFS) server.

At least the first was present and working in the PCBSD installer, I'm told although I never tested it.

@TonyBostonTB
Copy link

maybe @kmoore134 can jump in again here?

@danboid
Copy link
Author

danboid commented Jul 8, 2017

It would be cool if there was an LP equivalent to ssh-copy-id that would create a dataset, set the zfs permissions on it and copy the key - everything except create a new user.

@danboid
Copy link
Author

danboid commented Jul 11, 2017

@kmoore134 ?

@danboid
Copy link
Author

danboid commented Jul 11, 2017

As I said in my recent BSD Now interview, I think LifePreserver (in particular easy network restoration of full installs) could be the other killer feature of TrueOS, alongside its great support for boot environments such as its unique boot env install feature

@danboid
Copy link
Author

danboid commented Jul 11, 2017

Just having a look at this again now, the docs don't seem to mention using SSH passwords as being an option, yet when setting up replication targets we have a password entry box? As previously mentioned, the SSH restore wizard screen of the installer lacks any way to enter a password.

I'm not going to post again until kmoore134 has his say.

@danboid
Copy link
Author

danboid commented Jul 18, 2017

Still no reply from Kris!

There's another suggestion I want to make a note of here before I forget.

I have made requests across multiple github issues on here for making improvements to the TrueOS installer so as to make it possible to dual/multi boot TrueOS on a single disk, BIOS-based machine without resorting to workarounds like I have. In addition to these, I would also like to see the LP restore wizard give users the option of either restoring your TrueOS partitions to the exact same sizes as they were originally or to expand the TrueOS partition(s) to use all available space on the drive.

This would require that partition sizes are noted when snapshots are created, of course, and would be a necessary feature for anyone wanting to multiboot on a single drive and use the restore wizard. I am presuming it doesn't do this already?

@danboid
Copy link
Author

danboid commented Aug 13, 2017

A discourse user (twschulz) has submitted a pull request that he believes should fix SSH LP restores:

https://github.com/trueos/trueos-utils-qt5/pull/13/commits

@Mrt134
Copy link
Contributor

Mrt134 commented Aug 28, 2017

Those PRs have been pulled in - just need to test with the next UNSTABLE build.

@maurizio-emmex
Copy link

I am unsuccessfully testing with the TrueOS-Desktop-2017-10-16-UNSTABLE-x64-DVD.iso
I select English language, Installation type - Restore from Life Preserver backup.
In Restore Wizard I set Host Name, User Name and SSH Port, Use password authentication.
The installation program open a terminal shell with the message “Preparing to setup SSH key authorization…” where I can type the password.
This works and the Restore Wizard presents the Restore System Selection where I can find the my system to restore. Even the Restore Summary windows is correct but when I click the finish button the Installation Progress bar is at 24% forever.

@kmoore134
Copy link
Member

I've been promising to get to these lp issues for a while now. I'll code up a ssh-key exchange option to make this 'easy'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants