Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Algorithms
  4. Backup Algorithm

Backup Algorithm

Scheduled Pinned Locked Moved Algorithms
algorithmsquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Richard Andrew x64R Offline
    Richard Andrew x64R Offline
    Richard Andrew x64
    wrote on last edited by
    #1

    What's the strategy of backup programs when files are in use? If you back up a file during use, your backup may end up useless because of inconsistent data. So, should a backup program should attempt exclusive access on every file it backs up? And if it can't gain exclusive access, maybe come back to that file later?

    The difficult we do right away... ...the impossible takes slightly longer.

    L T 2 Replies Last reply
    0
    • Richard Andrew x64R Richard Andrew x64

      What's the strategy of backup programs when files are in use? If you back up a file during use, your backup may end up useless because of inconsistent data. So, should a backup program should attempt exclusive access on every file it backs up? And if it can't gain exclusive access, maybe come back to that file later?

      The difficult we do right away... ...the impossible takes slightly longer.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      That is the way most backup systems work. If any files still cannot be accessed after some predetermined number of retry attempts then the program would report that fact in its log.

      I must get a clever new signature for 2011.

      1 Reply Last reply
      0
      • Richard Andrew x64R Richard Andrew x64

        What's the strategy of backup programs when files are in use? If you back up a file during use, your backup may end up useless because of inconsistent data. So, should a backup program should attempt exclusive access on every file it backs up? And if it can't gain exclusive access, maybe come back to that file later?

        The difficult we do right away... ...the impossible takes slightly longer.

        T Offline
        T Offline
        Tadeusz Westawic
        wrote on last edited by
        #3

        As you have pointed-out; a backup of files alone is not enough to guarantee synchronisation on restore. Even if all files can be accessed there is still the time-sync/event-sync problem. A backup from which an app can restore itself is usually called a checkpoint. Such a "backup" would involve a transaction history file and a log file, as well as a "checkpoint" copy of pertinent files. Such backups are always built-into the app itself. The restore phase restores the files and then runs the app forward using the transaction history elements as input. The app must be suspended for the time it takes to perform the checpoint. There are techniques for minimising the timespan of the suspension, such as file twinning. A system-wide backup is not in my ken for today's platforms. However, anti-malware apps perform system-wide scans all the time, so I don't think file access is an issue, here. So what kind of backup do you have in mind?

        Tadeusz Westawic Sumi quid sum.

        Richard Andrew x64R 1 Reply Last reply
        0
        • T Tadeusz Westawic

          As you have pointed-out; a backup of files alone is not enough to guarantee synchronisation on restore. Even if all files can be accessed there is still the time-sync/event-sync problem. A backup from which an app can restore itself is usually called a checkpoint. Such a "backup" would involve a transaction history file and a log file, as well as a "checkpoint" copy of pertinent files. Such backups are always built-into the app itself. The restore phase restores the files and then runs the app forward using the transaction history elements as input. The app must be suspended for the time it takes to perform the checpoint. There are techniques for minimising the timespan of the suspension, such as file twinning. A system-wide backup is not in my ken for today's platforms. However, anti-malware apps perform system-wide scans all the time, so I don't think file access is an issue, here. So what kind of backup do you have in mind?

          Tadeusz Westawic Sumi quid sum.

          Richard Andrew x64R Offline
          Richard Andrew x64R Offline
          Richard Andrew x64
          wrote on last edited by
          #4

          I want to perform a standard type of file backup where the files are compressed and encrypted into a single backup file. I think I'll simply keep a log file of which files I couldn't open for exclusive access, and leave it to the user to close whatever application is using the file.

          The difficult we do right away... ...the impossible takes slightly longer.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups