Red Squirrel
[H]F Junkie
- Joined
- Nov 29, 2009
- Messages
- 9,211
One major issue with lot of programs that keep files open is how to backup it's data properly without causing corruption.
I want to implement a "backup" folder to my application, then the backup job would get data from that folder, and not the live data.
However, there's still the possibility that the backup runs while my program is in the middle of doing it's own backup. What is the best way to make this a safe operation?
I'm thinking, if I do the backup to a temp folder, then do a move to the backup folder, will that be safe? My app would be using system commands like cp and mv.
In the corporate world most apps that do this will backup maybe once a day at a certain interval, then the backup job is set so it does not conflict, but I want to make my app not rely on a setup like that, if possible.
I want to implement a "backup" folder to my application, then the backup job would get data from that folder, and not the live data.
However, there's still the possibility that the backup runs while my program is in the middle of doing it's own backup. What is the best way to make this a safe operation?
I'm thinking, if I do the backup to a temp folder, then do a move to the backup folder, will that be safe? My app would be using system commands like cp and mv.
In the corporate world most apps that do this will backup maybe once a day at a certain interval, then the backup job is set so it does not conflict, but I want to make my app not rely on a setup like that, if possible.