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.

Offline linuxhelp

  • *
  • 173
  • +0/-0
    • Linux PC & Server Support
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #15 on: October 31, 2008, 04:24:24 PM »
Hi Mary

perfect & thanks!

happy weekend to you all...
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 #16 on: November 01, 2008, 12:47:31 AM »
linuxhelp

Please confirm where exactly you copied the tar file to.
"ie Copy the previously made backup file, smeserver.tgz, to a fresh node"
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline linuxhelp

  • *
  • 173
  • +0/-0
    • Linux PC & Server Support
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #17 on: November 01, 2008, 12:34:47 PM »
Hi Mary

i made copy to Root not homes!!!

mount /media/usbdisk
cp /media/usbdisk/Backup-date-folder/smeserver.tgz  /
###############################################
after a restore the users have to move the smeserver.tgz from :

#mv /media/usbdisk/smeserver.tgz /media/usbdisk/Backupdate-folder/
 (cause every backup has the same name, and if users backup different pc to same disk it will be overwritten)

Better, is if the restore is timestamped by the restore skipt?
Must be added to bugs.contrib.org..

« Last Edit: November 01, 2008, 12:39:20 PM by linuxhelp »
Linux PC & Server Support
http://www.linuxonlinehelp.de
.. i Love SME..

Offline linuxhelp

  • *
  • 173
  • +0/-0
    • Linux PC & Server Support
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #18 on: August 18, 2009, 04:21:19 PM »
@Mary

please add to wiki

for restore to a new other Server (newserver.home.net)make..
after reboot delete old DNS Data inside SME
# db host show oldserver.home.net..  to list old entrys!!

and remove old with

db hosts delete oldserver.XXXX.XXX         XXX= domains.net  mit prename oldserver!!
signal-event post-upgrade
signal-event reboot

ready..
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 #19 on: August 18, 2009, 08:44:59 PM »
please add to wiki

linuxhelp, you can edit the wiki. You do not need to ask Mary to do it for you.

Offline linuxhelp

  • *
  • 173
  • +0/-0
    • Linux PC & Server Support
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #20 on: August 18, 2009, 08:56:38 PM »
Hello,

thanks i didn't know that i can write into it.

One Question, which skript does run if a user select USB-Backup
can i run it with crond? weekly?

Thanks..

update
http://wiki.contribs.org/Backup_server_config#Command_line_manual_Restore_from_USB_drive_or_memory_stick
« Last Edit: August 23, 2009, 09:46:04 AM by linuxhelp »
Linux PC & Server Support
http://www.linuxonlinehelp.de
.. i Love SME..

Offline cvlcc

  • ****
  • 102
  • +0/-0
    • http://Cvlcc.com
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #21 on: February 07, 2010, 06:12:42 PM »
I have a newly installed SME 7.4 server installed and with installed a USB with smeserver.tgz file and can you tell me line by line how i can reinstall the file to the server. please.

mount /media/CIDHOSTINGB
cp /media/CIDHOSTINGB/smeserver.tgz
at this point I got cp missing destination file
signal-event post-upgrade
signal-event reboot

IF I'm wrong please correct me
« Last Edit: February 07, 2010, 07:07:27 PM by cvlcc »
My we all be so humbled, To ask the questions and get straight answers. Sooner than later. Thank You For Your Time

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #22 on: February 07, 2010, 07:54:32 PM »
I have a newly installed SME 7.4 server installed and with installed a USB with smeserver.tgz file and can you tell me line by line how i can reinstall the file to the server. please.

mount /media/CIDHOSTINGB
cp /media/CIDHOSTINGB/smeserver.tgz
at this point I got cp missing destination file
signal-event post-upgrade
signal-event reboot

IF I'm wrong please correct me

mount external disk
cd to the mount point
follow this

ciao

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Restore on ssh-console from usb-drive with backup.tgz?
« Reply #23 on: February 08, 2010, 02:21:05 AM »
vclcc

Or better still this wiki Howto, which may be the step by step instructions you are asking for in another thread/post
http://wiki.contribs.org/Backup_server_config#Command_line_manual_Restore_from_USB_drive_or_memory_stick
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.