Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wonder what the best way to backup files via the network.

I have Solaris machines with Oracle 10i on a Veritas cluster. Machines are connected to EMC storage.

The /data/oracle directory is mounted on the EMC storage.

What I want is to backup the /data/oracle directory (70G) on some backup machine via the network (include soft-linked files). The reliability of copying files is very important.

I checked and found some ideas to do that.

For example the first option is to use rsync:

rsync   -WavH –progress   /data/oracle $backup_server_ip:/Backup_dir

The second option is transfering the files with tar and ssh, dealing with compression on both sides of the pipe:

cd /directory_that_we_want_to_backup
tar cpf - . | bzip2 -c | \
  ssh  $backup_server_ip  "cd /Backup_dir && bzip2 -d | tar xpf -"

and so on.

I need advice on what is more reliability from the options above, and maybe on what other good options there are for this.

share|improve this question
You have Oracle running on a Veritas cluster, with EMC storage, and you don't have "real" backup software? That's a bit unusual (in my experience). Not using RMAN either? Have you considered that? – Mat Mar 4 '13 at 6:06
rsync is very good at keeping a copy in sync as it doesn't transfer data which isn't modified which can save lots of bandwidth. tar + bzip2 is a better option if this is a one time thing. Depending on the link speed you might want to use a low compression setting or use gzip so the CPU can keep up with the network (bzip2 is very cpu intensive). – Eelke Mar 4 '13 at 6:19
@Eelke - what you mean about "doesn't transfer data which isn't modified" not clear for me? – Eytan Mar 4 '13 at 6:48
Are you doing this when the database is up? As @Mat said, you really should look into using enterprise tools for this. Backup and recovery is VERY important in an enterprise. Incremental rman backups also only backup changed blocks, but the difference is that rman knows about the data in the files - rsync doesn't (I'm assuming you're trying to hot backup all DB files) – Phil Mar 4 '13 at 8:54
@Phil first no , I will do the copy when DB is down ( shutdown oracle first ) , my target is to copy all /data/oracle files ( all partition ) – Eytan Mar 4 '13 at 23:28

Well theoretically you can issue the command "alter tablespace begin/end backup". Before and after you execute rsync. You will also need a backup copy of the control file. This approach was used many years ago before RMAN was introduced. The restore really requires Oracle experience. This approach is for example described in this book: "Unix Backup and Recovery".

A really recommend you to get familiar with RMAN. Even if you do not use backup agent like TSM/Netbackup you can still create local disk backups using RMAN and then you can synchronize this storage using rsync.

share|improve this answer

My standard backup regime for Oracle databases revolves around rman, flash recovery area and rsync. Basically as follows:

  1. Configure your database in archive log mode, without it you will lose data. Not a question of if, but when.

  2. Archived log files go to the flash recovery area.

  3. Configure rman retention policy according to how far back in time you wish to be able to go. You need this to recover from user errors that are detected some time after the fact.

  4. Size your flash recovery area to be able to keep all of this data.

  5. rsync your flash recovery area to another machine, preferable off site.

That's it. Simple and will work for 99.99% of all scenarios, if not more.

share|improve this answer
NB Also configure rman to backup your controlfile to the flash recover area! – Colin 't Hart May 3 '13 at 15:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.