General discussion

  • Creator
    Topic
  • #2131201

    backup

    Locked

    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?

All Comments

  • Author
    Replies
    • #3567502

      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.

      • #3559251

        backup

        by sunjay_singh ·

        In reply to backup

        Poster rated this answer

    • #3559250

      backup

      by sunjay_singh ·

      In reply to backup

      This question was closed by the author

Viewing 1 reply thread