LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to copy data from system to external hdd (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-copy-data-from-system-to-external-hdd-707073/)

gsnravi 02-24-2009 04:32 AM

how to copy data from system to external hdd
 
Hi,

I have RHEL 4. I would like to format existing os and load to freshly. I have some of below queries :
Pl. give me detailed answers with commands.

1. how to mount external usb drive.
2. how can I take backup to external usb drive.
3. which folders and files requried to take backup

Pl.give me answers.
Thnx in advance.

tajamari 02-24-2009 04:58 AM

Quote:

Originally Posted by gsnravi (Post 3455418)
Hi,

I have RHEL 4. I would like to format existing os and load to freshly. I have some of below queries :
Pl. give me detailed answers with commands.

1. how to mount external usb drive.
2. how can I take backup to external usb drive.
3. which folders and files requried to take backup

Pl.give me answers.
Thnx in advance.

It is unethical to dictate volunteers to give you the answer you want. I think you must learn the basics first. Google is your friend.

gergely89 02-24-2009 05:12 AM

These answers are neither exhaustive, nor the only possible solution. I suggest you boot from a live CD. For all tools see the man page or Google for better samples.

1. mount -t <your-filesystem-type> /dev/<your-device> <your-mount-directory>
2. dd if=<device-to-backup> of=<path-where-to-backup>
3. backup what you need restored - if in doubt, then backup everything (as in 2. with dd)

linux

jschiwal 02-24-2009 05:17 AM

There are many posts here that give instructions on mounting an external drive. (Search on this site for "mount uid gid fmask" and read the mount manpage) For backups, I'd recommend formatting the external drive with a native linux filesystem. The fat32 filesystem has a file size limit and doesn't retain permissions. Don't forget that whatever you uses needs to backup all file attributes including ACLs and the Security context. So use something supplied by your distro (RHEL) so you are certain it is built with the correct options. If you use LVM, look at using LVM mirror dumps. If you run a MSQL server, there is a package written to perform LVM snapshots to backup up a MSQL tables partition.

On way perform backups is to use rsync. This will replicate files to another computer or a directory. Another way is to use tar or dar to perform backups. If you use tar, be sure to read the section on Incremental Dumps in Section 5.2 of the tar info manual. This option lets you create a timestamp file and perform incremental backups after an initial full backup.

Don't backup the /tmp, /proc, /sys or /dev directories. The first doesn't need to be backed up. The latter are pseudo filesystem, or created at boot time.

Don't backup the /mnt or /media directory. They are for mounting other filesystems & shares. However if you mount a fixed directory that you use on /mnt, in that case it would be OK. The /mnt/ directory would be where you are mounting the destination filesystem so you don't want to back it up. Look at what you mount on /mnt and make a case by case decision.

A program for KDE that I used to use was kdar. It was a graphical front end for the dar program. Dar is a disk archiver, and archives to slices, which you can later burn to CD or DVD if you wanted. The kdar program may not be supported anymore, but you can export the "full backup", "incremental backup" and "restore" jobs to a bash script. That would allow you to use the script in a cron job.

gsnravi 02-28-2009 03:23 AM

Hi Thank you for ur suggestions and answers,

I run fsck command on / after getting ctrl+d option. but after completion of fsck there is more than 4.5gb last+found directory created on root. the root almost all full.

1. how can i remove the last+found directory or it is required for further steps.
2. is there any steps after completion of fsck.

Pl.give me ur speedy reply bcz its urgnt.


All times are GMT -5. The time now is 11:14 PM.