Skip to content

Commit 7711f94

Browse files
author
Gogs
committed
Add gem to backup application
1 parent 4824097 commit 7711f94

4 files changed

Lines changed: 24 additions & 5 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@
1515
/log/*
1616
!/log/.keep
1717
/tmp
18+
19+
# Ignore backup files
20+
site-backup.tgz

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ gem 'bcrypt', '~> 3.1.7'
2727
gem 'jwt'
2828
gem 'config'
2929

30+
# Rails Backup
31+
gem 'rails-backup-migrate'
32+
3033
# Use Unicorn as the app server
3134
# gem 'unicorn'
3235

Gemfile.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ GEM
133133
bundler (>= 1.3.0)
134134
railties (= 5.2.3)
135135
sprockets-rails (>= 2.0.0)
136+
rails-backup-migrate (0.0.12)
137+
activerecord (>= 2.3)
136138
rails-dom-testing (2.0.3)
137139
activesupport (>= 4.2.0)
138140
nokogiri (>= 1.6)
@@ -203,6 +205,7 @@ DEPENDENCIES
203205
jwt
204206
mysql2 (~> 0.4.4)
205207
rails (= 5.2.3)
208+
rails-backup-migrate
206209
sass-rails (~> 5.0)
207210
sdoc (~> 0.4.0)
208211
spring

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,23 @@ EveryDocs Core is the server-side part of EveryDocs. This project will contain a
77
## Installation
88

99
1. Make sure you have Ruby installed. For an installation guide, check here: [Ruby installation guide](https://guides.rubyonrails.org/getting_started.html#installing-rails)
10-
2. If you haven't installed the Rails Gem, you can run the following command: _gem install ruby_
11-
3. Clone this repository in a location of your own choice: _git clone https://github.com/jonashellmann/everydocs-core_
10+
2. If you haven't installed the Rails Gem, you can run the following command: ``gem install ruby``
11+
3. Clone this repository in a location of your own choice: ``git clone https://github.com/jonashellmann/everydocs-core``
1212
4. Configure your database connection in config/database.yml
1313
5. Configure the folder where documents are stored in config/settings.yml
14-
6. Start your Rails server on a specific port (or on port 3000, if you don't use the command line parameter): _rails server --port 1234_
15-
7. Access the application on http://localhost:1234 or configure any kind of proxy forwarding in your webserver.
16-
8. If you wish to use this application in your web browser, consider to install [EveryDocs Web](https://github.com/jonashellmann/everydocs-web/)!
14+
6. Install required dependencies by ruuning: ``bundle install``
15+
7. Start your Rails server on a specific port (or on port 3000, if you don't use the command line parameter): ``rails server --port 1234``
16+
8. Access the application on http://localhost:1234 or configure any kind of proxy forwarding in your webserver.
17+
9. If you wish to use this application in your web browser, consider to install [EveryDocs Web](https://github.com/jonashellmann/everydocs-web/)!
18+
19+
## Backup
20+
21+
To backup your database, you can run: ``rake site:backup``. This command
22+
creates an archive file called site-backup.tgz. You can restore this backup by
23+
running ``rake site:restore``.
24+
25+
Additionally you have to backup the place where the documents are stored. You
26+
can configure this in config/settings.yml. To restore, just put the documents back in that location.
1727

1828
## Routes Documentation
1929

0 commit comments

Comments
 (0)