General discussion

Locked

backup

By sunjay_singh ·
1)Can the dump command be used to backup data on a locally mounted volume?
2)How can the cp command be used to do incremental backup?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

backup

by cpfeiffe In reply to backup

Although it is recommended to unmount file systems before backing them up (to guarantee you get every file in a consistent state) running dump on a locally mounted filesystem will work.

If you just want to copy certain files to another location then cp can be used to do a backup. You can find the files that you need to copy (those that changed since a certain period of time) and copy them to a new destination. For example

find . -mtime -1 -exec cp {} /new_dir \;

This basically says that you want to find all files, starting in the current directory that have been modified in less than one day and copy them to /new_dir. The {} just means to use the result of the find command before the -exec option and the \; is required to end this structure of the find command. You can change the value following -mtime (it can even be + instead of -). You can also use -atime (accessed instead of modified). These are files that were touched, but not changed. I believe a variation of -mtime with a minuse(-) value is the best for your scenario.

I hope this helps.

Collapse -

backup

by sunjay_singh In reply to backup

Poster rated this answer

Collapse -

backup

by sunjay_singh In reply to backup

This question was closed by the author

Back to Linux Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums