Linux Backup

Posted on 2002-07-07
Medium Priority
Last Modified: 2012-05-04
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,
Question by:d_p2

Accepted Solution

dkloes earned 900 total points
ID: 7134934
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?

Expert Comment

ID: 7134939
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.

Author Comment

ID: 7136559
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,

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.


Expert Comment

ID: 7146660
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.

Author Comment

ID: 7151146
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,

Expert Comment

ID: 7151319
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.

Author Comment

ID: 7151968
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,


Expert Comment

ID: 7153851
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:

Expert Comment

ID: 7247497
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 (root@Pentium.suse.de) (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 freshmeat.net) which is a program to create a bootable recovery CD for your machine.

Expert Comment

ID: 9088968
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.

Expert Comment

ID: 9484970
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

Author Comment

ID: 9493145
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!



Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

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.

Join & Write a Comment

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question