[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] Copy live EPrints to staging server



Hi!

Well, I assume that you don't need fresh data all the time, so database 
could be imported once, and occasionally re-imported.

We have git initialized in ~/archives/ARCHIVE_NAME/ directory

In .gitignore
--
var/
documents/
html/
cfg/cfg.d/10_core.pl
cfg/cfg.d/20_baseurls.pl
cfg/cfg.d/database.pl


And those cfg.d files copied eg. 10_core.pl.dist etc..

So we can keep different environments for dev and prod.

Also, there is a central repository (bitbucket) and we are pushing and 
pulling :)

We are still testing it so if someone has a tip please comment :)

Best,
-- 
Alen Vodopijevec

Odsjek za informacijske tehnologije
Centar za znanstvene informacije
Institut Ru?er Bo?kovi?
------------------------------------------------
IT Section
Centre for Scientific Information
Rudjer Boskovic Institute
------------------------------------------------
Addr: Bijenicka cesta 54, Zagreb, HR
Email: alen at irb.hr
Web: www.lib.irb.hr | www.irb.hr
Tel: + 385 1 4560 929, x1243
Mob: + 385 98 584 045

Skype: vodopijevec
GTalk: alen.vodopijevec


On 04/27/2016 12:21 PM, Andrew Beeken wrote:
> Okay, so I can get as far as step 7 ? now, I?m running this from the
> development tree (that I copied from live), rather than the installed
> tree. Is this right? Likewise, I presume I need to change the 10_core
> file in the development tree?
>
> *From:*eprints-tech-bounces at ecs.soton.ac.uk
> [mailto:eprints-tech-bounces at ecs.soton.ac.uk] *On Behalf Of *Andrew Beeken
> *Sent:* 25 April 2016 14:20
> *To:* eprints-tech at ecs.soton.ac.uk
> *Subject:* Re: [EP-tech] Copy live EPrints to staging server
>
> Thanks Adam ? step 11 is pretty much why I?m doing this JI did have a
> dev build on an old Macbook but the VM wouldn?t restore itself on my new
> Windows machine so, starting from scratch! (yay!)
>
> *From:*eprints-tech-bounces at ecs.soton.ac.uk
> <mailto:eprints-tech-bounces at ecs.soton.ac.uk>
> [mailto:eprints-tech-bounces at ecs.soton.ac.uk] *On Behalf Of *Adam Field
> *Sent:* 25 April 2016 13:43
> *To:* eprints-tech at ecs.soton.ac.uk <mailto:eprints-tech at ecs.soton.ac.uk>
> *Subject:* Re: [EP-tech] Copy live EPrints to staging server
>
> 1) install a fresh copy of EPrints and configure it to work on the dev
> server (to make sure all prerequisites are ship-shape).  It'll make
> things simpler if you use the same database name, username and password
> as the live repository.  Test that you can raise it in a browser, log
> in, create a record, etc.  There's a training video for this.
>
> 2) Dump the live database into the EPrint tree somewhere (perhaps
> <eprints_root>/archives/<foo>/db_dump/<timestamped_filename>.mysqldump)
>
> 3) Create an tarball of the EPrints tree (tar cvzf
> live_eprints<datestamp>.tar.gz <eprints_root>)
>
> 4) Copy the tarball to dev
>
> 5) tar xvzf the file to somewhere appropriate, check file permissions
> for the apache user on dev
>
> 6) undump the database dump (cat filename | mysql -u username -p) --
> easy if you have used the same username and password as all the
> permissions are set up.  Still easy if you didn't and know how to create
> users and set permissions in mysql.
>
> 7) edit the 10_core.pl file in the archive directory to use the URL of
> the dev server.  Then run generate apacheconf (I think with the
> --replace flag, but that's from memory).
>
> 8) Change your apache configuration to point to where you unpacked the
> eprint tree.
>
> 9) restart apache.
>
> 10) Debug the above process and document it on the wiki.
>
> 11) Think about getting your repository into source control to make this
> easier.
>
> Jisc <http://www.jisc.ac.uk/>
>
> *Adam Field*
> SHERPA services analyst developer
>
> *From: *<eprints-tech-bounces at ecs.soton.ac.uk
> <mailto:eprints-tech-bounces at ecs.soton.ac.uk>> on behalf of Andrew
> Beeken <anbeeken at lincoln.ac.uk <mailto:anbeeken at lincoln.ac.uk>>
> *Reply-To: *"eprints-tech at ecs.soton.ac.uk
> <mailto:eprints-tech at ecs.soton.ac.uk>" <eprints-tech at ecs.soton.ac.uk
> <mailto:eprints-tech at ecs.soton.ac.uk>>
> *Date: *Monday, 25 April 2016 12:47
> *To: *"eprints-tech at ecs.soton.ac.uk
> <mailto:eprints-tech at ecs.soton.ac.uk>" <eprints-tech at ecs.soton.ac.uk
> <mailto:eprints-tech at ecs.soton.ac.uk>>
> *Subject: *[EP-tech] Copy live EPrints to staging server
>
> Hi folks,
>
> I?m trying to bring our live EPrints install over to a staging server to
> do some work on it, but I?m struggling to do this in an elegant way.
> What?s the best approach? I tried bringing the archive files down and
> repopulating the database; there are also a few core changes to our
> install in Perl-Lib which need bringing down however most times I pull
> all these across and restart apache it screws things over. I?m pretty
> sure I need to tweak some config settings and possibly run a few things
> from the command line but I was wondering if anyone could digest the
> procedure for me or point me in the direction of one if it?s already
> been written!
>
> Cheers!
>
> Andrew
>
>
> *The University of Lincoln, located in the heart of the city of Lincoln,
> has established an international reputation based on high student
> satisfaction, excellent graduate employment and world-class research.*
>
>
> The information in this e-mail and any attachments may be confidential.
> If you have received this email in error please notify the sender
> immediately and remove it from your system. Do not disclose the contents
> to another person or take copies.
>
> Email is not secure and may contain viruses. The University of Lincoln
> makes every effort to ensure email is sent without viruses, but cannot
> guarantee this and recommends recipients take appropriate precautions.
>
> The University may monitor email traffic data and content in accordance
> with its policies and English law. Further information can be found at:
> http://lincoln.ac.uk/legal.
>
>
> Jisc is a registered charity (number 1149740) and a company limited by
> guarantee which is registered in England under Company No. 5747339, VAT
> No. GB 197 0632 86. Jisc?s registered office is: One Castlepark, Tower
> Hill, Bristol, BS2 0JA. T 0203 697 5800.
>
> Jisc Services Limited is a wholly owned Jisc subsidiary and a company
> limited by guarantee which is registered in England under company number
> 2881024, VAT number GB 197 0632 86. The registered office is: One Castle
> Park, Tower Hill, Bristol BS2 0JA. T 0203 697 5800.
>
>
>
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/
> *** EPrints developers Forum: http://forum.eprints.org/
>

-- 
Alen Vodopijevec

Odsjek za informacijske tehnologije
Centar za znanstvene informacije
Institut Ru?er Bo?kovi?
------------------------------------------------
IT Section
Centre for Scientific Information
Rudjer Boskovic Institute
------------------------------------------------
Addr: Bijenicka cesta 54, Zagreb, HR
Email: alen at irb.hr
Web: www.lib.irb.hr | www.irb.hr
Tel: + 385 1 4560 929, x1243
Mob: + 385 98 584 045

Skype: vodopijevec
GTalk: alen.vodopijevec