Solved

Linux Backup

Posted on 2002-07-07
12
465 Views
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,
dp
0
Comment
Question by:d_p2
12 Comments
 
LVL 1

Accepted Solution

by:
dkloes earned 300 total points
Comment Utility
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?
0
 
LVL 1

Expert Comment

by:dkloes
Comment Utility
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.
0
 

Author Comment

by:d_p2
Comment Utility
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,
dp

0
 
LVL 1

Expert Comment

by:dkloes
Comment Utility
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.
0
 

Author Comment

by:d_p2
Comment Utility
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,
dp
0
 
LVL 1

Expert Comment

by:dkloes
Comment Utility
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.

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

System:
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.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:d_p2
Comment Utility
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

Daily
-----
Right, i will use #tar -cvf backupDirectory

System
------
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,
dp


0
 
LVL 1

Expert Comment

by:dkloes
Comment Utility
Since you have split your OS into separate file systems, this is probably a good place to start:
http://www.nethamilton.net/docs/dump.html

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

Here is a reference for creating a rescue disk:
http://www.toms.net/rb
0
 
LVL 2

Expert Comment

by:linuxwrangler
Comment Utility
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.
0
 

Expert Comment

by:CleanupPing
Comment Utility
d_p2:
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
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 2

Expert Comment

by:TheWeakestLink
Comment Utility
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.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheWeakestLink
EE Cleanup Volunteer
0
 

Author Comment

by:d_p2
Comment Utility
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!

regards,
dp


0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now