Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Wat if I want to get a new external HDD and back up the data on my comp ?? Do U get wat I mean ???
As in... keep backing up at regular intervals (for eg everyday) ... Wat shud I do then ??
I saw somewhere on the web, that once I attach the HDD to my comp, I shud set up the frequency in fstab or something to back up my home directory at regular intervals... But I dun quite get wat it means...
Lemme make my question simple....
I have a RHL comp... I want to back up my home directory (where existing files are edited or new files created or old files are deleted), so that I dun lose ne data if my comp decides to take a walk...... I planned to get an external HDD (say, a 120 GB HDD) and do the back up.... Kindly help me with wat I shud do !!!
External HDD alright but what kind .is it a USB hdd ...?
make sure that its supported by ur distro... check that in redhat.com...
setting it up and
run...
cp -R -p ~/ ur-hdisk-mntpoint-directory
to automated backup u can use several tools ...
or simply u can put the above command in the crontab
I am searching for how to back up data dynamically too. Now I using scripts and crontab to back up data every day. In my scripts I use the option -u in cp or tar command , it backup the newly created files only, but it can not delete the backup files while the corresponding files deleted in the original files, Any ideas?
My scripts:
1. mount the backup hard disk in a certain directory.
2. if mounting is successful(using if ... fi statement), using tar cvfu(data < 4G) or cp -au (data >4G) to backup data.
3. if backup operation is successful , umount the harddisk.
My crontab :
00 00 * * * scriptsname
(backup data at 00:00 ervery day)
You can do that using just bash scripts, or you can do that using some scripting language like perl. I suggest that you consider learning perl, so that what you think will be done quite easily.
Also, sudhir , you can consider learning a little about automounts. I don't know if you will suit you, but you can set up your system such that the external hdd is automatically maounted on regular intervals, and data is then backed up, and finally the external hdd is umounted.
As for details about fstab, it is a startup file that is consulted by the kernel to check which partitions to mount at booting. It is in /etc/fstab and its format is easily understood. For ore info on fstab, you can just type man fstab or 'info fstab'. The format is the device first, the mount point next, the fs type next, and finally options about who can mount them and what permissions they have.
Now I get quite a bit about this... and I read thru the automount stuff on the web and also the fstab in my comp..... and I can understand a bit now....
Thanks to Manju too....
Will try to set it up in a coupla days (or may be in a week or two) and get back to u with the feedback about how it all went....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.