Koozali.org: home of the SME Server

upgrade to new HW using Affa : not copy all content

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
upgrade to new HW using Affa : not copy all content
« on: February 13, 2013, 04:12:18 PM »
I'm following this
http://wiki.contribs.org/Moving_SME_to_new_Hardware
to move my SME8 to new HW (HP N40L) but it do not copy everything the way I supposed... so or something is wrong or I'm doing something wrong. I'm betting the problem it's me... if not I'll open a bug. :)

I follow howto but from 596 GB (as seen on backup/restore screen of SME) it just copy 174GB (as seen from "df -h" of new server).
The old server is a Affa server with 315GB of data just for /var/affa.
The /var is not included in copy and no info about this exist on Wiki!!!

Code: [Select]
[root@leopardo Antigo]# ls -la scheduled.0/
total 28
drwxr-xr-x  5 root root 4096 Feb 13 11:08 .
drwx------  5 root root 4096 Feb 13 11:08 ..
-rw-r--r--  1 root root  615 Feb 13 11:08 .AFFA-REPORT
-rwx------  1 root root 1721 Feb 13 11:08 Antigo-setup.pl
drwxr-xr-x  5 root root 4096 Feb 12 19:45 etc
drwxr-xr-x  3 root root 4096 Dec 12 17:14 home
drwxr-x--- 24 root root 4096 Feb 12 12:28 root
[root@leopardo Antigo]#


The Antigo.log files reports a completed backup... but the missing rpm list is empty!
Even after I included the SMEServer=yes on config, it do not populate the list!

Am I missing something ?

Jáder
...

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: upgrade to new HW using Affa : not copy all content
« Reply #1 on: February 13, 2013, 04:26:50 PM »
Am I missing something ?

yes.. re-read carefully Affa wiki page, you will discover you can add or exclude path from backup

if the old server is an affa server, moving datas is not (IMHO and AFAIK) trivial, as affa uses hard links

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: upgrade to new HW using Affa : not copy all content
« Reply #2 on: February 13, 2013, 05:06:38 PM »
yes.. re-read carefully Affa wiki page, you will discover you can add or exclude path from backup
Hum... I've used affa for long time to backup client data... this is my first time using it to move to a new server BUT I'd think EVERYTHING should be copied from OLD to NEW, no just important parts (as defined by Affa). I'd think about to update Wiki about this.
Quote
if the old server is an affa server, moving datas is not (IMHO and AFAIK) trivial, as affa uses hard links

I've done this before... it's a matter of find out what exact options activate on rsync... I should have take notes on previous one! :$

...

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: upgrade to new HW using Affa : not copy all content
« Reply #3 on: February 13, 2013, 05:17:56 PM »

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
Re: upgrade to new HW using Affa : not copy all content
« Reply #4 on: February 13, 2013, 10:23:31 PM »
In my experience, I've found out that I moved hardware without my /opt folder, which was horrible. All of my web apps are there. It is really bad when the previous server has went down, and you set up most of the staff on cloud based apps for productions, which you install into /opt/ directory using SME Site Maker. Installing into /opt/ directory is especially useful when you have different Open BaseDir for different apps.

I've, also, never been able to get the missing rpm listing to work with SME 8.0. I just assumed that AFFA was not made for 8.0, so all the extra features may not be working. I'm not sure if this is a bug, or if the AFFA built for SME 7.0 cannot properly evaluate the rpm's installed in an 8.0 environment.
I have not been able to get this to work for an SME 7.0 with AFFA installed, backing up a SME 8.0 production server.
SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: upgrade to new HW using Affa : not copy all content
« Reply #5 on: February 13, 2013, 10:55:29 PM »
newburns & jader

Quote
In my experience, I've found out that I moved hardware without my /opt folder...


Well that is only because you did not include /opt in the list of folders to backup, ie in the backup job properties.
As Stefano says, refer to http://wiki.contribs.org/Affa#Job_configuration_properties
Include[] and Exclude[] directives.

I recall you have been told this in the past too !

The reason /opt is not included by default, is because /opt is NOT part of the standard sme backup inclusions.
If you choose to use /opt or any other non standard location to install or save data, then you need to include that location in the backup.
You can add many Include[]
ie
'Include[0]'=>'/opt',
'Include[1]'=>'/myfolder',
'Include[2]'=>'/etc/dansguardian',
& so on.
It is very easy to add these to a backup job.

Refer http://wiki.contribs.org/Backup_server_config#Standard_backup_.26_restore_inclusions
« Last Edit: February 13, 2013, 11:15:29 PM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: upgrade to new HW using Affa : not copy all content
« Reply #6 on: February 13, 2013, 10:58:23 PM »
My question here is about Wiki do not tell JUST DEFAULT SME things will be copied.

If it's a FULL MOVE TO NEW HW solution... should copy EVERYTHING including /var, /opt, ...

I'll find out other way (rsync!) because I need to move forward.

Jáder
...

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: upgrade to new HW using Affa : not copy all content
« Reply #7 on: February 13, 2013, 11:34:21 PM »
jader

Quote
....do not tell JUST DEFAULT SME things will be copied.
If it's a FULL MOVE TO NEW HW solution... should copy EVERYTHING including /var, /opt, ...

Your interpretation is not correct.
Affa is not a disk cloning tool.

Affa (in default usage) conforms to the standard sme server backup concept, in that it backs up directories as listed in
http://wiki.contribs.org/Backup_server_config#Standard_backup_.26_restore_inclusions
ie
home/e-smith
etc/e-smith/templates-custom
etc/e-smith/templates-user-custom
etc/ssh
root
etc/sudoers
etc/passwd
etc/shadow
etc/group
etc/gshadow
etc/samba/secrets.tdb
etc/samba/smbpasswd
etc/smbpasswd

which does not by default include /opt or /var or anything else not on that list.

You can add other non standard directories to be included in a backup by using the Include[] directive.


To move to new hardware still requires you to install sme server on the new hardware, then run through the procedure to use Affa to move to new hardware, which includes installing the affa contrib & later reinstall any other contribs.

If you effectively want a disk cloned, then you need to use some other method, or make modifications to Affa or to the Affa backup job.

Keep in mind you do not really want to clone the drive & use it in different hardware, because various drivers & setups required for the newer/different architecture will most likely be incorrect.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: upgrade to new HW using Affa : not copy all content
« Reply #8 on: February 13, 2013, 11:35:16 PM »
you don't need other ways, just use Affa and add the dir you need to move..

Offline pmstewart

  • *
  • 73
  • +0/-0
Re: upgrade to new HW using Affa : not copy all content
« Reply #9 on: February 16, 2013, 09:10:46 PM »
Very well explained Mary, AFFA has saved our butts a time or two (build two production servers, different hardware - one installed with AFFA). If the main production server has failed we simply rise the second server and off we go. We use the "include" and "exclude" statements to ensure we get only what we want and need. As an extra precaution we also attach external drives to backup the production server info just in case but have never needed to restore from the external disk.

AFFA is what you need to do the job because it works on different hardware or is not identical hardware dependent!