RedmineBackupRestore » History » Revision 1
Revision 1/9
| Next »
Go MAEDA, 2018-01-10 15:08
Made dedicated page from [[RedmineInstall#Backups]] and [[RedmineUpgrade#Step-2-Backup]]
Backing up and restoring Redmine¶
- Table of contents
- Backing up and restoring Redmine
Backup¶
Redmine backups should include:- Database
- Attachments (stored in the
files
directory of your Redmine install)
Backing up database¶
MySQL¶
The mysqldump
command can be used to backup the contents of your MySQL database to a text file. For example:
/usr/bin/mysqldump -u <username> -p<password> <redmine_database> > /path/to/backup/db/redmine.sql
PostgreSQL¶
The pg_dump
command can be used to backup the contents of a PostgreSQL database to a text file. Here is an example:
/usr/bin/pg_dump -U <username> -Fc --file=redmine.sqlc <redmine_database>
SQLite¶
SQLite databases are all contained in a single file, so you can back them up by copying the file to another location.
Backing up attachments¶
All file uploads are stored in the files/
directory. You can copy the contents of this directory to another location to easily back it up.
Sample backup script¶
Here is a simple shell script that can be used for daily backups (assuming you're using 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¶
TODO
Updated by Go MAEDA almost 7 years ago · 1 revisions