Koozali.org: home of the SME Server

Restore on ssh-console from usb-drive with backup.tgz?

Offline linuxhelp

  • *
  • 173
  • +0/-0
    • Linux PC & Server Support
Restore on ssh-console from usb-drive with backup.tgz?
« on: September 06, 2008, 03:50:06 PM »
Hello

is it possible to restore the server without a screen? and CDROM?
perhaps with ssh over local net? (cause server-manager  does not
reach the files+rights on disk, something after freshsetup+restore was wrong)

Has anyone made a Setup-USB-Stick of SME SERVER?
Thanks
Linux PC & Server Support
http://www.linuxonlinehelp.de
.. i Love SME..

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #1 on: September 06, 2008, 05:13:44 PM »
linuxhelp

If referring to the standard sme server backup & restore, a restore should only be done to a freshly installed sme OS.
You will be given the chance to select the backup file location to restore from ONLY the first time you run the OS after a fresh install.
You can select a CD/DVD or a USB drive/stick.

Therefore you will need to perform the restore at the console with a monitor connected.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline m

  • ****
  • 276
  • +0/-0
  • Peet
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #2 on: September 06, 2008, 10:15:31 PM »
You will be given the chance to select the backup file location to restore from ONLY the first time you run the OS after a
I know that the following doesn't answer the OP's question, but on an existing installation you can run
Code: [Select]
config delete PasswordSet
config setprop bootstrap-console Run Yes
signal-event reboot
You then will be lead to the configuration console with the option to restore from a backup.
I myself have never made use of it, but I expect it will work.

Offline m

  • ****
  • 276
  • +0/-0
  • Peet
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #3 on: September 06, 2008, 10:25:23 PM »
@linuxhelp

A remote restore can be done with (untested, no warranty, may be wrong or incomplete)
Code: [Select]
/sbin/e-smith/signal-event pre-restore
tar -C / -xzf smeserver.tgz
/sbin/e-smith/signal-event post-upgrade
/sbin/e-smith/signal-event reboot


Offline linuxhelp

  • *
  • 173
  • +0/-0
    • Linux PC & Server Support
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #4 on: September 17, 2008, 09:15:20 PM »
Hi after several test i wasn't able to make a working backup to a external
usb 2.0 disk, the auto-mount of the console do always show that there is
no usb drive, but i can manual mount it perfectly?? whats wrong there?

If  i take a 4GB usbstick console will do backup, but the tarfile has errors..
if i copy i back to my second sme server ..

i want to make a second sme server as mirrored server..
Linux PC & Server Support
http://www.linuxonlinehelp.de
.. i Love SME..

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #5 on: September 18, 2008, 03:32:22 AM »
mweinber

Quote
....but on an existing installation you can run
config delete PasswordSet
config setprop bootstrap-console Run Yes
signal-event reboot

That will achieve the purpose of being asked to do a (one off) restore on the next reboot.
The problem with that is there may be existing ibays, users and other configuration which will be retained, and potentially cause confusion and/or data issues, for example, there will be old ibays in the file system but they will not be displayed in server manager etc etc.

You should only restore to a clean (ie empty) newly installed sme operating system
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline m

  • ****
  • 276
  • +0/-0
  • Peet
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #6 on: September 19, 2008, 03:57:27 AM »
mary,

That will achieve the purpose of being asked to do a (one off) restore on the next reboot.
The problem with that is there may be existing ibays, users and other configuration which will be retained, and potentially cause confusion and/or data issues, for example, there will be old ibays in the file system but they will not be displayed in server manager etc etc.

You are right in general. But when you do a restore from a smeserver.tgz a boot time you should end up with a consistant system. I concede that you may have some garbage data (ibays/user homes) which you can either ignore and waste disk space or clean up manually. Correct me if I'm wrong.
Anyway, I would never use that. I prefer rsync based backup&restore like Affa.


Offline linuxhelp

  • *
  • 173
  • +0/-0
    • Linux PC & Server Support
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #7 on: October 21, 2008, 01:32:00 AM »
Hello Michael,

why do you not submit that affa works inside server-manager panel?
might be easier for normal admins (most of them don't like console)

Regards Tom
Linux PC & Server Support
http://www.linuxonlinehelp.de
.. i Love SME..

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #8 on: October 21, 2008, 05:21:34 AM »
I know that the following doesn't answer the OP's question, but on an existing installation you can run ...
I myself have never made use of it, but I expect it will work.

If there are any users/groups/files added to the system since installation, then the results of the restore will be undefined and probably undesirable. Full restore from backup should only be done on a freshly installed system.

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #9 on: October 21, 2008, 02:59:46 PM »
I guess nobody can accuse Michael of promoting his own work.....

Quote
i want to make a second sme server as mirrored server..

If this is what you are trying to achieve, nothing does it better, easier, quicker, and more reliably than AFFA.

http://wiki.contribs.org/Affa

I take my hat off to you, Mr. Weinberger.

Offline m

  • ****
  • 276
  • +0/-0
  • Peet
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #10 on: October 21, 2008, 09:35:13 PM »
Tom,
why do you not submit that affa works inside server-manager panel?
I don't need it. Operating on the console is much more efficient. But feel free to develop a GUI on the top of Affa.
might be easier for normal admins (most of them don't like console)
That is not my experience, except for Win admins.

Offline linuxhelp

  • *
  • 173
  • +0/-0
    • Linux PC & Server Support
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #11 on: October 30, 2008, 07:23:43 PM »
Hello@All

positive feedback

on some free days i was able to restore my used systems
with:
- fresh setup
- copy smeserver.tgz to fresh node
- run as root
# signal-event pre-restore
# tar -C / xzvf smeserver.tgz
#/sbin/e-smith/signal-event post-upgrade
#/sbin/e-smith/signal-event reboot
- after reboot login to admin-console to change IPs
- reboot
- now online :o)

I have tested some different USB-Disks/Sticks and have seen
that external USB-Drives with external Power runs error free,
but some USB-Sticks and USB-Disks powered by USB makes
problems (low voltage/Hal-Daemon problems)

may it be a big problem to add ftp backup to admin-console?
to save smeserver.tgz to a other server?

Don't misunderstand me, the most of "Beginner-Admins" don't like
linux-console use at small companies

I am often asked for a PDF-Manual of SME is there one?
« Last Edit: October 30, 2008, 07:33:01 PM by linuxhelp »
Linux PC & Server Support
http://www.linuxonlinehelp.de
.. i Love SME..

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #12 on: October 30, 2008, 07:29:11 PM »
Hello@All

positive feedback

on some free days i was able to restore my used systems
with:
- fresh setup
- copy smeserver.tgz to fresh node
- run as root
# tar -C / xzvf smeserver.tgz
#/sbin/e-smith/signal-event post-upgrade
#/sbin/e-smith/signal-event reboot
- after reboot login to admin-console to change IPs
- reboot
- now online :o)

You left out a step. You must run "signal-event pre-restore" before extracting the backup file.

Offline linuxhelp

  • *
  • 173
  • +0/-0
    • Linux PC & Server Support
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #13 on: October 30, 2008, 07:32:00 PM »
Hallo

SORRY!!

i' m gone be blind...

Tom
Linux PC & Server Support
http://www.linuxonlinehelp.de
.. i Love SME..

Offline janet

  • ****
  • 4,812
  • +0/-0
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.