# Best way to backup a rails project on linux?

**URL:** <https://www.ruby-forum.com/t/best-way-to-backup-a-rails-project-on-linux/132030>\
**Category:** Rails\
**Created:** [March 15, 2008, 4:04pm UTC](https://www.ruby-forum.com/t/best-way-to-backup-a-rails-project-on-linux/132030 "2008-03-15T16:04:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjohnson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3ec8ea/32.png) [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Post date:** [March 15, 2008, 4:04pm UTC](https://www.ruby-forum.com/t/best-way-to-backup-a-rails-project-on-linux/132030/1 "2008-03-15T16:04:50Z")

</div>

I need to set up a back up system to back up my rails projects and  
databases. What would you recommend for doing this on linux? rsync?

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![benjohnson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3ec8ea/32.png) [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Post date:** [March 15, 2008, 4:42pm UTC](https://www.ruby-forum.com/t/best-way-to-backup-a-rails-project-on-linux/132030/2 "2008-03-15T16:42:25Z")

</div>

On 15 Mar 2008, at 16:04, Ben J. wrote:

> I need to set up a back up system to back up my rails projects and  
> databases. What would you recommend for doing this on linux? rsync?

On our production machines, we just have a cron tab that does an sql  
dump to a directory, together with all uploaded files if present in  
the application, then commit the whole lot to an external subversion  
repository. That repository is backed up on a regular basis. All of  
our Rails apps (development) are either in subversion or git, they  
also get backed up. You could use rsync to do that.

Our dedicated servers have RAID, which offers at least some form of  
continuous backup and the system is setup as a vps. Twice a week  
there’s a VPS snapshot that’s taken.

There are a lot of backup strategies you can implement. It all depends  
on what you are trying to actually achieve with your backup.

Best regards

Peter De Berdt

---

<div class="post-metadata">

**Author:** ![benjohnson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3ec8ea/32.png) [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Post date:** [March 15, 2008, 7:52pm UTC](https://www.ruby-forum.com/t/best-way-to-backup-a-rails-project-on-linux/132030/3 "2008-03-15T19:52:27Z")

</div>

I use rsync to back up my local rails application every night to an  
external drive attached to my development machine

I also use svn to keep track of all my changes (the backup is just in  
case I don’t commit some changes, then kill some important file the  
next day - this could be avoided by committing every day, but  
sometimes I forget 😉

the database on the remote machine is backed up every night using  
mysqldump and then rsynced to another location.

On top of that, I want to add mysql replication, and to back up all  
the images that are stored on the remote machine (we don’t back up any  
assets yet, but we should).

Mike
