LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   About cp command for backup purpose (https://www.linuxquestions.org/questions/linux-general-1/about-cp-command-for-backup-purpose-476589/)

satimis 08-23-2006 09:40 AM

About cp command for backup purpose
 
Hi folks,

I'm prepared to connect an USB enclosure to PC to be used for backup data from /home/user's directory with cp command regularly.

My questions are;

1) Can I run incremental copying for time saving with following options up
$ cp -p -R -u /home/user/* /mnt/point/of/usb_enclosure/

2) Is there any method whenever I save a file on /home/user/directory_A a duplicate copy would be saved on the USB enclosure automatically to /directory_A which has already been existing.

3) Is there any better method to serve my purpose solely to backup data from /home/user/ on USB enclosure regularly

TIA

B.R.
satimis

DotHQ 08-23-2006 10:11 AM

Looks like a good plan to me.
You might at a -d so that the copy does not follow symbolic links. Or you could use the -a (archive) which is equivalent to using -dpR.

Either way I think you're plan as is will work just fine. :D

timmeke 08-23-2006 10:27 AM

There are many backup solutions besides cp. rsync to name one. Try searching this forum for backup software.

Matir 08-23-2006 01:31 PM

If you just want a basic 'update this mirror periodically', definitely use rsync.

satimis 08-24-2006 05:24 AM

Hi folks,

Tks for your advice.

Follows were the result of googling;
Code:

A Tutorial on Using Rsync
Last updated on November 20th, 1999
http://everythinglinux.org/rsync/rsync_content.html

Easy Automated Snapshot-Style Backups with Linux and Rsync
http://www.mikerubel.org/computers/rsync_snapshots/

How to setup rsync for anonymous mirroring - Chapter 2:
http://sunsite.dk/info/guides/rsync/rsync-mirroring02.html

Rsync tutorial
http://www.fredshack.com/docs/rsync.html

Any injection? TIA. Which of the above is more appropriate to my application?

My top preference is to have replication on the USB enclosure whenever a copy of file is saved on local HD (PC HD). It'll save my work to run rsync periodically creating backup on the enclosure.

B.R.
satimis


All times are GMT -5. The time now is 07:04 PM.