backup
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?
Linux
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?
by cpfeiffe
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.
by sunjay_singh
by sunjay_singh
This discussion is closed to new replies.
Sort by Trending