klenwell information services : WikkaUpgrade134

Revision history for WikkaUpgrade134


Revision [3057]

Last edited on 2016-07-09 16:54:44 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Additions:
New Version: [[http://docs.wikkawiki.org/WhatsNew134 | 1.3.4]]
Previous Version: [[http://docs.wikkawiki.org/Installing132 | 1.3.2-p7]]
This update took as long as it did because I wanted to create a [[http://docs.fabfile.org/en/1.3.2/ | Fabric script]] that would download this, my production, site and database and install it on my local development server. From there, I could install the update. Then I could run my Fabric script again to upload the update code and datebase back here.
Deletions:
New Version: [[http://docs.wikkawiki.org/WhatsNew134 1.3.4]]
Previous Version: [[http://docs.wikkawiki.org/Installing132 1.3.2-p7]]
This update took as long as it did because I wanted to create a [[http://docs.fabfile.org/en/1.3.2/ Fabric script]] that would download this, my production, site and database and install it on my local development server. From there, I could install the update. Then I could run my Fabric script again to upload the update code and datebase back here.


Revision [2443]

Edited on 2013-03-08 22:31:34 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Additions:
New Version: [[http://docs.wikkawiki.org/WhatsNew134 1.3.4]]
Deletions:
New Version: [[http://docs.wikkawiki.org/WhatsNew134 1.3.2-p7]]


Revision [2442]

Edited on 2013-03-08 22:13:26 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Deletions:
to_ = archivist_email


Revision [2441]

Edited on 2013-03-08 22:12:50 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Additions:
from fabric.api import (sudo, get)


Revision [2440]

Edited on 2013-03-08 22:12:34 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Additions:
I did not include my whole Fabric script here as it contains some private information. But here are some key functions from that script:
def wiki_back_code(archive_dir, email_address):
"""backup production source code, email as attachment to given address,
and save to archive_dir"""
# globals
global datestamp, timestamp
global live_wiki_root
# parameters
remote_wd = '/tmp/wiki-back-%s' % (datestamp)
tar_file = 'wiki-%s.tar.gz' % (timestamp)
archive_path = pathjoin(archive_dir, tar_file)
# create remote working dir
mkdir = 'mkdir -p %s' % (remote_wd)
sudo(mkdir, shell=False)
# copy wiki root dir to working dir
cp = 'cp -R %s %s' % (live_wiki_root, remote_wd)
sudo(cp, shell=False)
# tar wiki dir
tar_dir_target = pathjoin(remote_wd, basename(live_wiki_root))
tar_file_path = pathjoin(remote_wd, tar_file)
tar = tar_dir(tar_dir_target, tar_file_path)
sudo(tar, shell=False)
# download tar file
get(tar_file_path, archive_dir)
# mail
to_ = archivist_email
subject = email_subject_for_code_backup
body = email_template_for_code_backup % dict(tar_file=tar_file)
attachment = archive_path
email_attachment(to_, subject, body, attachment)
# cleanup remote
rm = 'rm -Rf /tmp/is'
sudo(rm, shell=False)

# return archive file
Deletions:
I did not include my whole Fabric script here as it contains some private information. But here are the major command and task functions:


Revision [2439]

The oldest known version of this page was created on 2013-03-08 21:58:27 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]