Koozali.org: home of the SME Server

Backup sme8 to fresh install

Offline cattledog

  • ***
  • 70
  • +0/-0
Backup sme8 to fresh install
« on: August 14, 2014, 01:33:29 AM »
Hi all....
I have done backup before with usb but I can not recall if it backs up the ports that I have opened?  With this new install I only want users profiles including passwords and settings for server ie: server name ip for domain but nothing else ie:no rpms or contribs, minecraft and so on.

Any help would be great
cheers in advance

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Backup sme8 to fresh install
« Reply #1 on: August 14, 2014, 02:11:43 AM »
cattledog

All configuration is backed up & restored.
Add on contribs that you installed from rpms are NOT included in backups, but the configuration settings & mysql databases that the contrib creates are included in the backup.
Custom templates are also included in backups.

The best approach for you is to uninstsll contribs & remove all configuration & mysql databases relating to those contribs BEFORE you run the backup.

SME server does not provide an easy way to isolate user accounts passwords ibays etc, they are all lumped together in various files that form a "set".

Remove everything you do not want on the new server ie contribs settings users ibays & so on, BEFORE you run the backup.

Refer to Backup server config Howto for general info about backup inclusions, but the workaround  techniques described there are NOT what you want in this situation AFAICT.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline cattledog

  • ***
  • 70
  • +0/-0
Re: Backup sme8 to fresh install
« Reply #2 on: August 14, 2014, 03:22:13 AM »
so any thing that I changed in /safe_ports even custom templates would be backed up?
bugger...was just hopeing to keep users and passwords and server config as in just name of the box and ip range I gave it

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Backup sme8 to fresh install
« Reply #3 on: August 14, 2014, 04:10:01 PM »
cattledog

You can remove custom templates (you should remove them if upgrading to a new OS version) & remove custom db settings.
Then do
signal-event post-upgrade
signal-event reboot

and your system should restart with default values for settings.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline cattledog

  • ***
  • 70
  • +0/-0
Re: Backup sme8 to fresh install
« Reply #4 on: August 15, 2014, 01:27:11 AM »
So...Janet the settings that I have made anywhere will be reverted back like a refresh install, and all the user profiles will be intact?  Is there away to now just copy over the user passwords and user profiles to the new server? (second server making first one redundant) just want users accounts and nothing more from the old one.

cheers janet

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Backup sme8 to fresh install
« Reply #5 on: August 15, 2014, 01:58:47 AM »
cattledog

I do not want things to go wrong for you, so I will continue to answer you as you seem a little unsure.

Quote
so...the settings that I have made anywhere will be reverted back like a refresh install

Only if you remove (uninstall) contribs, remove custom templates, remove custom db changes you made, & revert any other manual setting changes you may have implemented, along with issuing the post upgrade & reboot commands.
There is also another useful command
initialize-default-databases
see http://wiki.contribs.org/SME_Server:Adding_Software#Restoring_Default_Yum_Repositories
but think wisely before doing that as add on repo info etc that you have manually setup will be deleted


Quote
....and all the user profiles will be intact?

Yes, they should be (in a standard functioning server). They are part of the configuration & that information is transferred if you do a backup & restore that includes the standard inclusions, refer
http://wiki.contribs.org/Backup_server_config#Standard_backup_.26_restore_inclusions

Quote
Is there away to now just copy over the user passwords and user profiles to the new server? (second server making first one redundant) just want users accounts and nothing more from the old one.

Already answered.
Again, No you cannot selective extract that information, it is in the same set of files that contain, group, pseudonym, ibay, & accounts etc information, & no one has yet created a routine that will extract that. It is not a trivial matter to do this.

Refer to the Backup server config Howto for a general overview of backup & restore
http://wiki.contribs.org/Backup_server_config#Backup_and_Restore_concepts.2C_issues_and_other_information

There are workarounds described to limit the amount of other data included in a backup eg ibays, but unless you are familiar with sme server & understand what you are doing you could lose or overlook important information that should be transferred eg mysql databases, so proceed carefully & do a test run first if using any of these non standard methods.
For eg see
http://wiki.contribs.org/Backup_server_config#Procedure


The simplest approach to just transferring user profiles & passwords & basic server settings, is to delete everything else off the server first (in server manager panels), delete ibays, groups, & return any other settings to standard values. Then do the backup & restore, then tweak the new server as required.
You can rerun the admin Console & select Configure this server anytime you want to change main server settings, wan IP etc etc etc. It is quite safe to do this & all data & users etc will be retained, except the settings you are changing of course.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline cattledog

  • ***
  • 70
  • +0/-0
Re: Backup sme8 to fresh install
« Reply #6 on: August 15, 2014, 02:03:50 AM »
Thnks Janet...for your time and assistance.... 8-)

Offline cattledog

  • ***
  • 70
  • +0/-0
Re: Backup sme8 to fresh install
« Reply #7 on: August 19, 2014, 08:55:28 AM »
Janet....I know that I am a little backward in doing stuff with sme 8 but I have another dumb question.

When you boot sme and you have options of starting with different install because of upgrades if I choose the earliest or even the first upgrade will that start sme8 prior to contribs that I may have installed????

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Backup sme8 to fresh install
« Reply #8 on: August 19, 2014, 09:08:21 AM »
cattledog

No it's not booting to a different install(ation), it typically just boots to an earlier kernel version.
This may be useful if there is a bug in the newer version of the kernel or if some other packages you have installed conflict with the newer version of the kernel & you may need to boot up to an older kernel to get your server functioning & be able to troubleshoot the problem.

It's usually best (safest etc) to use the latest kernel especially for Internet connected servers, as security bugs are updated in kernel releases.

The contribs will still all be there as installed whiuchever kernel lyou boot to.
Note that some contribs are dependent on specific kernel version modules, so you cannot run older kernels.

Removing contribs is usually pretty easy & quick, so what are you trying to achieve/avoid
eg
yum remove smeserver-affa
or
rpm -e smeserver-affa

Some contribs require database details to be removed manually.
« Last Edit: August 19, 2014, 09:11:45 AM by janet »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline cattledog

  • ***
  • 70
  • +0/-0
Re: Backup sme8 to fresh install
« Reply #9 on: August 19, 2014, 09:25:54 AM »
Just want everything off....so as to be like a fresh install

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Backup sme8 to fresh install
« Reply #10 on: August 19, 2014, 09:45:03 AM »
cattledog

Quote
Just want everything off....so as to be like a fresh install

So uninstall all contribs & manually remove any db entries etc that may be left behind
Remove custom templates (see below for listing tool)
Remove any other settings you have made or changed.
Reset repositories to default, see FAQ
Remove extra mysql databases, be careful doing this

Delete ibays, groups, users, pseudonyms etc in server manager (except users you want to keep)

You may need to do a clean install on another test server & compare settings etc to see what needs to be removed.

This command will show you extra rpms installed
/sbin/e-smith/audittools/newrpms

This command will show you custom templates
/sbin/e-smith/audittools/templates

There are other useful diagnostic tools in
/sbin/e-smith/audittools/
run them as above

Then do a backup
Then do a restore to the new server

Delete any unwanted (not standard) mysql databases that came across.

That's about as close as you are going to get to a clean server.

Otherwise just install a new server OS & manually re-enter all your users etc & whatever else you want setup on that server.

I have told you multiple times now, so stop asking & start doing, ideally on a test server first to sort out your mistakes or potential unknown issues.
« Last Edit: August 19, 2014, 09:54:04 AM by janet »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline cattledog

  • ***
  • 70
  • +0/-0
Re: Backup sme8 to fresh install
« Reply #11 on: August 19, 2014, 09:57:25 AM »
Good on ya...shall start doing after tea..cheers

Offline cattledog

  • ***
  • 70
  • +0/-0
Re: Backup sme8 to fresh install
« Reply #12 on: August 21, 2014, 08:43:34 AM »
Ok....done backup onto desktop and installed sme9...just in case I have problem I have the backup of users.  When I manually put the add users in at server manager screen I assume all has to be the exact same as what was in there before? And will there be a trust issue with them trying to log on the first time?...cheers

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Backup sme8 to fresh install
« Reply #13 on: August 21, 2014, 09:32:34 AM »
cattledog

Quote
When I manually put the add users in at server manager screen I assume all has to be the exact same as what was in there before? And will there be a trust issue with them trying to log on the first time?

If you mean trust issues in relation to logging in to workstation that are members of a trusted DOMAIN, then yes you will have problems. The machine accounts will be recreated & will not allow you to access the old user profiles on the workstations. All user profile settings etc will be gone.

That's why you do a Restore, as machine accounts are included in the backup data & restored users will be able to login correctly to workstations that are part of a trusted DOMAIN.

If you do a restore you do not need to add users, ibays or any other configuration, all that will be restored.
Usually if you are on new hardware (& new NIC's), then after the restore you need to login to the admin console (login to server as admin), then select Configure this server, and in the process select the correctly shown NIC's, all other details should be OK (ie same as old server).
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.