• en
  • de
  • fr
  • es
  • br
  • ru
  • jp
  • kr
AI translation
  • ae
  • cn
  • vn
  • id
  • eu
  • il
  • gr
  • no
  • fi
  • dk
  • se
  • tr
  • bg
  • nl
  • it
  • pl
  • hu
  • ro
  • ua
  • cs

How to Back Up or Restore Your Existing Redmine Data

10 minutes
Lukáš Beňa

The success of each project management solution is based on one simple thing - the data. Do you already know how to back up or restore your existing data from Redmine? If not, here is how you can do it for each database.

Redmine backups must include:

  • Database
  • Attachments (deposited in the files directory below the installation directory via default)

Backing up database


MySQL, the foremost popular Open Source SQL database system, is unique, distributed, and supported by Oracle Corporation. The MySQL website offers the newest facts about MySQL software. MySQL may be a management device.

A database may be a structured series of statistics. it's going to be something from a simple shopping listing to a picture gallery or the considerable quantities of facts during a company network. To add, get entry to, and process facts stored during a pc database, you would like a database control device alongside MySQL Server. Since computers are superb at handling large quantities of statistics, management systems play a central function in computing, as standalone utilities, or as components of other applications. MySQL databases are relational.

An electronic database stores statistics in separate tables rather than putting all the statistics in one large storeroom. The database structures are prepared into physical documents optimized for speed. The logical model, with gadgets including databases, tables, views, rows, and columns, gives a bendy programming environment. You found out rules governing the relationships between one among a sort of information fields, inclusive of one-to-one, one-to-many, unique, required or optional, and “pointers” between extraordinary tables.

The database supports these regulations, and with a very well-designed database, your utility by no means equals inconsistent, duplicate, orphan, out-of-date, or missing statistics. The SQL component of “MySQL” stands for “Structured Query Language”. SQL is the commonest standardized language that wants to get the right of entry to databases. counting on your programming environment, you'll enter SQL directly (for example, to get reports), embed SQL statements into code written in the other language, or use a language-specific API that hides the SQL syntax. SQL is described by using the ANSI/ISO SQL Standard.

MySQL software program is open source. Open Source means it is viable for everyone to use and alter the software program. Anybody can download the MySQL software from the web and use it without paying anything. If you would like, you'll have a glance at the availability code and alternate it to fit your needs.

The MySQL software program makes use of the GPL (GNU General Public License), to define what you'll and won't do with the software in specific situations. If you experience discomfort with the GPL or want to embed MySQL code into a business application, you'll buy a commercially licensed model from us.

See the MySQL Licensing Overview for more statistics. The MySQL Database Server could also be in no time, reliable, scalable, and smooth to use. If that is what you are looking for, you would like to offer it a try. MySQL Server can run easily on a laptop, alongside your different applications, net servers, and so on, requiring little or no attention.

If you commit a whole system to MySQL, you'll alter the settings to require an advantage of all of the memory, CPU power, and I/O potential available. MySQL also can scale the maximum amount as clusters of machines, networked together. MySQL Server was at the start evolved to handle big databases much faster than existing solutions and has been efficaciously utilized in tremendously worrying production environments for several years. Although under continuous development, MySQL Server now offers an upscale and valuable collection of functions.

Its connectivity, speed, and security make MySQL Server exceptionally perfect for gaining access to databases on the web. MySQL Server runs in client/server or embedded operations. The MySQL Database Software may be a patron/server machine that has a multi-threaded SQL server that helps exceptional back ends, numerous exceptional consumer applications and libraries, administrative tools, and a good sort of utility programming interfaces (APIs).

It might be very likely that your favorite software or language helps the MySQL Database Server. The pronunciation of “MySQL” is “My Ess Que Ell” (not “my sequel”), but it’s okay in case you pronounce it as “my sequel” or in some different localized way.

Here’s how you can backup data for My SQL:

The mysqldump command can be used to back up the contents of your MySQL database to a text file. For example:

mysqldump -u <username> -p <password> <database_name> > /path/to/backup/db/redmine.sql

Find these <username>, <password>, <hostname>, and <redmine_database> in the file config/database.yml. <host_name> might not be needed depending on your installation of the database.


PostgreSQL is an enterprise-magnificence open-source management system. It supports each SQL for relational and JSON for non-relational queries. It's backed by an experienced community of developers who have made extraordinary contributions to form it into an enormously dependable DBMS system. PostgreSQL supports advanced data kinds and advances performance optimization, features best available within the expensive business database, like Oracle and SQL Server.

MySQL or PostgreSQL?

The MySQL challenge has made its supply code to be had below the terms of the GNU License, and different proprietary agreements. PostgreSQL is launched underneath PostgreSQL License. It's now owned via Oracle Corporation and offers several paid editions. It's unfastened and open-source software. That approach you'll never get to pay anything for this service.

MySQL is ACID-compliant at best when the utilization of NDB and InnoDB Cluster Storage engines PostgreSQL is completely ACID compliant. MySQL performs well in OLAP and OLTP structures where only study pace is vital. PostgreSQL’s overall performance works satisfactorily in structures that decide for the execution of complicated queries.

MySQL is reliable and works nicely with BI (Business Intelligence) programs, which are hard to read PostgreSQL works well with BI applications. However, it's miles extra appropriate for Data Warehousing and records evaluation packages that want rapid examine-write speeds.

Here’s how you can backup data for PostgreSQL:

  1. Log in as the postgres user:

    su - postgres

  2. Use the pg_dump command to backup all the contents of a PostgreSQL database to a text file:

    pg_dump -U <username> -Fc < database_name> > /path/to/backup/db/redmine.sql

Find these <username> and <redmine_database> in the file config/database.yml. The pg_dump command will assist you to access the password when required.


SQLite may be a software library that gives an electronic database management gadget. The lite within the SQLite approach is lightweight in terms of setup, database administration, and required resources. SQLite has subsequent noticeable capabilities: self-contained, serverless, zero-configuration, transactional. Serverless Normally, an RDBMS alongside MySQL, PostgreSQL, etc., requires a separate server manner to work.

The applications that require to urge entry to the database server use TCP/IP protocol to send and acquire requests. This is often called client/server architecture. RDBMS Client-Server Architecture SQLite doesn't paint in this manner. SQLite doesn't require a server to run. SQLite database is integrated with the appliance that accesses the database.

The programs engage with the SQLite database to look at and write immediately from the database files saved on disk. What is SQLite Self-Contained SQLite may be a self-contained manner that involves minimal assistance from the operating gadget or outside the library. That presents SQLite as helpful in any circumstance, particularly in embedded gadgets like iPhones, Android phones, game consoles, hand-held media players, etc. SQLite has developed the utilization of ANSI-C.

The ASCII text file is to be had as an outsized sqlite3.C and its header report sqlite3.H. If you would like to broaden a utility that uses SQLite, you only have to drop these files into your project and assemble it alongside your code. Zero-configuration due to the serverless architecture, you don’t get to “install” SQLite before the utilization of it. there's not any server procedure that must be configured, started, and stopped. SQLite does not practice any configuration files. All transactions within SQLite are completely ACID-compliant.

Its manners and modifications are Atomic, Consistent, Isolated, and sturdy. In several words, all modifications inside a transaction happen absolutely or under no circumstances even when an unexpected state of affairs like a utility crash, energy failure, or operating device crash occurs. SQLite distinctive capabilities SQLite uses dynamic sorts for tables. It means you'll keep any price in any column, regardless of the statistics type. SQLite allows one database connection to urge the proper entry to quiet one database file simultaneously.

This brings many satisfactory features like joining tables in exceptional databases or copying statistics among databases during a single command. SQLite is in a position to make in-memory databases that will be in no time to paintings with. SQLite databases are all contained during a file, so you'll back them up by copying the file to a different location. You can determine the file name of the SQLite database by watching config/database.yml.

Backing up attachments

Each file upload is stored in attachments_storage_path (defaults to the files/ directory). You can copy the contents within this directory to a different location to quickly back it up.

WARNING: attachments_storage_path may point to a special directory aside from files/. Be certain to review the setting in config/configuration.yml to evade making a useless backup.

Sample backup script

Here may be an easy shell script that can be used for daily backups (assuming you're employing a MySQL database):

# Database

/usr/bin/mysqldump -u <username> -p<password> <redmine_database> | gzip > /path/to/backup/db/redmine_`date +%Y-%m-%d`.gz

# Attachments

rsync -a /path/to/redmine/files /path/to/backup/files

Restore a database


For instance, if you hold a gziped dump file with the title 2018-07-30.gz, then the database can be recovered with the subsequent command:

gunzip < 2018-07-30.gz | mysql -u <username> -p <redmine_database>

Enter password.


When the choice -Fc of the command pg_dump is employed as it is at the above example then you would like to use the command pg_restore:

pg_restore -U <username> -d <redmine_database> redmine.sql

A text file can also be restored with psql:

psql <redmine_database> < <infile>


Copy the database file from the location of the backup.

The ultimate Redmine upgrade? Easy.

Get all powerful tools for perfect project planning, management, and control in one software.

Try Easy Redmine in 30 days free trial

Full features, SSL protected, daily backups, in your geolocation