Linux Backup

Hi All,

I am using RedHat 7.2 and arcserve 7.  

Here are my backup plan:

1. Whole system backup/3month
2. Daily backup: postgresql, qmail and vpopmail

Could anyone provides the backup/restore scripts for (1) and can i do the online backup for (2)?

Thanks a lot!

Best regards,
Who is Participating?
dkloesConnect With a Mentor Commented:
Since you are doing a system backup 3 times per month (or is it every 3 months?), I would suggest going to a "normal" minimal backup scheme:

I assume you are using tape backups.
Have two sets of rotating weekly tapes.
Set 1 for the first week, set 2 for the second week.
Have three rotating EOM tapes.  EOY tape.
Daily backup except last business day of the week (Fri or Sat)
You might also consider backing up critical system files on your daily backup - i.e. passwd, group, shadow
System backup at end-of-week
Normal backup commands include tar, cpio, dump

In order for experts to give you more guidance, please answer the following questions:
How much data is being backed up daily?
How many file systems and how much data for full backup?
Capacity of media?
Oops, just noticed you are using Arcserve 7.  Any particular reason for using Archserve such as a mixed OS environment?  If not, you might consider using traditional Unix backup commands to minimize downtime and maximize alternatives.  Using third party software does complicate matters in some respects that may offset the benefits of the software.  Although I am sure some experts will disagree.
d_p2Author Commented:
Thanks dkloes!

For the whole system backup, i think i will backup per quarter.  I am using RAID 1 already, and the total disk space is around 30G.  

For the whole system backup:  
I would like to reduce the downtime and backup as more as relevant files so that the recover time is reduce and the data won't be lost!

I will tar the /, /root, /home, /var, /lib, /opt, /etc, /bin, /usr, /opt to the tape, but i just wonder if the machine is down and i install the basic os and restore the above directories, some files is missing.

For the daily backup (email or db backup)
i think i will stop the service and tar/copy the folder to tape and start the service again.  However, i think it is not a good methods

So, Please comment my methods!

Thanks for your advice!

Best regards,

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Sorry it took so long to get back but to you but did not realize the system was using my old e-mail address.

Daily backup - your plan seems to be OK.  tar or cpio is best.  How much data?

System backup - best method would be to have the OS files on one partition and data (including /home) on one or more other partitions.  This would allow you to use dump (image) and restore for the root partition without having to load the OS.  I always worry about selective system backups as you plan.  It also makes it easier to restore since you boot from a rescue disk, prepare the partition and restore from there.
d_p2Author Commented:
hi dkloes,

no need to say sorry and i am very appreciate for your kindly helping hand!

Daily backup
Is there any better solution?

System backup (whole disk)
i will simply use the command
#tar -cvf /dev/st0 /          (Is that right?)
can i use the arcserve to do the system backup?

Thanks a lot!

Best regards,
Still need to know how much data you have and how the disk is partitioned.  Show the output from df.
Still need to know the capacity of your tapes.

tar -cvf /dev/st0 directory1 directory2 ...

Recommend using dump of the root partition.  I will be able to give you better advice when you provide the above information.

Yes you can use Arcserve for both daily and system backups.  I am not current on Arcserve so maybe one of the other experts can help you there.
d_p2Author Commented:
here is my partition info:
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sda6              1525856    204248   1244096  15% /
/dev/sda2                31111      5705     23800  20% /boot
/dev/sda5              4127076     38092   3879340   1% /opt
none                    256464         0    256464   0% /dev/shm
/dev/sda9               256667     16220    227195   7% /tmp
/dev/sda3             26858236   2067036  23426880   9% /usr
/dev/sda7              1035660     76244    906808   8% /var

The capacity of the tape is 20GB/40GB

Right, i will use #tar -cvf backupDirectory

I am quite worry about the system backup, as it has some /dev, /proc folder.  I am not sure whether i have to backup or not.  Pls give me the details steps for using dump.  BTW, pls provide the steps for recovery.

Thanks a lot!

Best regards,

Since you have split your OS into separate file systems, this is probably a good place to start:

This should give you enough info to decide whether to use dump, tar, or Arcserve.

Here is a reference for creating a rescue disk:
Just jumping in:

You don't need to worry about most (all?) of the stuff in proc - those are "virtual" files which are used to read or set information in the kernel. Remember that just about everything in *nix can be treated as a file. For example:

cat /proc/uptime
6151882.70 6001163.28

cat /proc/version  
Linux version 2.4.10-4GB ( (gcc version 2.95.3 20010315 (SuSE)) #1 Fri Sep 28 17:20:21 GMT 2001

As for postgresql, you must be sure to do a pg_dump of your database. Unless you wait until the database is inactive and do a clean shutdown, then backup all the data files, then restart the database your backup will probably not be reliable (and may not be usable). Use pg_dump to create a dump file and back up that file (or route the output from pg_dump to your backup device).

Also remember that backup can save your data but you may want to investigate disaster recovery. Check out mindy/mondo (search at which is a program to create a bootable recovery CD for your machine.
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept comments from dkloes as answer
Please leave any comments here within the next seven days.


EE Cleanup Volunteer
d_p2Author Commented:
Thanks for ur suggestion.
Even though i want to use Arcserve as a backup tools, i still very appreciate for the suggestion of using basic tools!
Thanks a lot!


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.