Bitnami-Redmine-备份

技术文档网 2021-04-16

##Bitnami Redmine 备份##

  1. 备份数据用root登录PhpMyAdmin,导出bitnami_redmine数据库(SQL格式),保存为bitnami_redmine.sql.zip. 或者
    $ /usr/bin/mysqldump -u root -p your_database > backup.sql
    
  2. 备份附件:备份文件夹 /opt/bitnami/apps/redmine/htdocs/files;

##Bitnami Redmine 恢复##

  1. 恢复数据:用root帐号登录PhpMyAdmin,删除默认的bitnami_redmine数据库,新建bitnami_redmine数据库,选定后再导入bitnami_redmine.sql.zip;
  2. 恢复附件:用备份的附件文件夹覆盖/opt/bitnami/apps/redmine/htdocs/files。

##Bitnami Redmine 重启服务##

You can use the /opt/bitnami/ctlscript.sh file or the /etc/init.d/bitnami script to manage your servers:

 $ sudo /opt/bitnami/ctlscript.sh help
usage: /opt/bitnami/ctlscript.sh help
/opt/bitnami/ctlscript.sh (start|stop|restart|status)
/opt/bitnami/ctlscript.sh (start|stop|restart|status) MySQL
/opt/bitnami/ctlscript.sh (start|stop|restart|status) apache

help       - this screen
start      - start the service(s)
stop       - stop  the service(s)
restart    - restart or start the service(s)
status     - show the status of the service(s)

##Bitnami Redmine 开启phpmyadmin服务##

编辑/opt/bitnami/apps/phpmyadmin/conf/httpd-app.conf

Allow from 127.0.0.1 改为 Allow from all

Require local 改为 Require all granted

重启动apache服务,访问http://xxxxxx/phpmyadmin

登录root|bitnami

如需访问凭据,密码为administrator|bitnami

##配置IP和主机名##

By default, BitNami applications update their internal IP/hostname at boot time. However you may want to change it manually if the Virtual Machine has changed its IP. For doing that, execute:

$ sudo /opt/bitnami/updateip --machine_hostname < ip or hostname >

or if you want the tool setting the current Virtual Machine IP you can type only:

sudo /opt/bitnami/updateip

Then try to access from a remote machine. Please ensure that your Virtual Machine network configuration is "Bridged". You can see the "How to access the BitNami Virtual Appliance".

##Bitnami 配置文件路径##

/opt/bitnami/apps/redmine/htdocs/config/

##Bitnami 备份配置文件##

cp configuration.yml configuration.yml.bak

cp database.yml database.yml.bak

升级时可将上述文件复制到新环境的相应目录下

##数据库升级##

Go to your hosting account and populate the database. If you have full access to the machine you can do the following:

$ mysql -u root -p
Welcome to MySQL!
mysql> drop database your_database;
mysql> create database your_database;
mysql> grant all privileges on your_database.* to 'database_user'@'localhost' identified by 'database_password';
mysql> flush privileges
$ mysql -u root -p your_database < backup.sql

如升级后无法登录,出现internal 500错误(日志在 /opt/bitnami/apps/redmine/htdocs/log/production.log),解决方法如下: 执行

sudo rake db:migrate RAILS_ENV=production

   如出现类似rake aborted! You have already activated rake 0.9.2.2, but your Gemfile requires rake 10.1.0. Using bundle exec may solve this.的错误提示,需要对rake版本进行更新: 进入path to redmine/htdocs 目录,执行(需要root权限):

gem uninstall rake
gem install rake
bundle install
bundle update

然后

sudo rake db:migrate RAILS_ENV=production

上述操作需要联网下载文件。 gem 可以指定版本安装 如gem install rake -v '10.1.0'

如果安装了插件,也需要数据库移植操作:

rake redmine:plugins:migrate RAILS_ENV=production

 

相关文章

  1. supervisor使用教程

    一、安装 1:easy_install 安装: easy_install supervisor 2:pip 安装: pip install supervisor 3:Debian / Ubuntu

  2. gitlab的ssh key不生效的问题

    在用 gitlab 的管理代码时发现一个问题:如果用 http 协议,每次 push 的时候都需要输入用户名和密码,如果 用 ssh 协议,先要生成公钥: ssh-keygen -t rsa -C

  3. UOJ安装指南

    这是一个UOJ的docker版本。在安装之前,请确认Docker已经安装在您的操作系统中。这个docker的映像是64位的版本,在32位的系统上安装可能会出现错误。 安装 请先下载 JDK7u76

  4. untu14.04下创建用户并赋予执行sudo命令的权限

    untu14.04下创建用户并赋予执行sudo命令的权限 创建用户:adduser +用户名(该命令在home下生成用户目录并创建用户) 1. 切换到root用户下 2. /etc/sud

  5. 如何查看当前apache的工作模式prefork worker还是event模式?

    查看apache工作模式 $ apachectl -V (注:apachectl可理解为apache control,其实是一段bash脚本) Server version: Apache/2.4.

随机推荐

  1. supervisor使用教程

    一、安装 1:easy_install 安装: easy_install supervisor 2:pip 安装: pip install supervisor 3:Debian / Ubuntu

  2. gitlab的ssh key不生效的问题

    在用 gitlab 的管理代码时发现一个问题:如果用 http 协议,每次 push 的时候都需要输入用户名和密码,如果 用 ssh 协议,先要生成公钥: ssh-keygen -t rsa -C

  3. UOJ安装指南

    这是一个UOJ的docker版本。在安装之前,请确认Docker已经安装在您的操作系统中。这个docker的映像是64位的版本,在32位的系统上安装可能会出现错误。 安装 请先下载 JDK7u76

  4. untu14.04下创建用户并赋予执行sudo命令的权限

    untu14.04下创建用户并赋予执行sudo命令的权限 创建用户:adduser +用户名(该命令在home下生成用户目录并创建用户) 1. 切换到root用户下 2. /etc/sud

  5. 如何查看当前apache的工作模式prefork worker还是event模式?

    查看apache工作模式 $ apachectl -V (注:apachectl可理解为apache control,其实是一段bash脚本) Server version: Apache/2.4.