LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-20-2009, 08:00 AM   #1
jeitjes
LQ Newbie
 
Registered: Jun 2009
Posts: 1

Rep: Reputation: 0
Wink Howto write a backup script on linux


I am writing a backup script on linux using python

The script runs continuously on a live linux box and tries to backup every file that changes in the filesystem by checking the latest change time of the file.

My question is how can I maintain file integrity with files being used by running applications on the box and these files being read and written to by the backup script.

Do I nead some form of locking (flock does not seem to be the trick, but I don't know)

Kind regards,

Jeroen Eitjes
 
Old 06-20-2009, 08:48 AM   #2
akiku
Member
 
Registered: Jun 2009
Distribution: Slackware
Posts: 62

Rep: Reputation: 17
Quote:
Originally Posted by jeitjes View Post
The script runs continuously on a live linux box and tries to backup every file that changes in the filesystem by checking the latest change time of the file.
Have you considered using existing applications written specifically for this purpose, such as rsync or unison?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to write a backup script? joseph2020 Ubuntu 12 06-15-2009 01:36 PM
howto write a script to echo files with spaces in the name dsids Linux - Newbie 1 11-28-2006 07:18 AM
How to write script file in Linux? rust8y Linux - General 3 05-20-2006 05:49 AM
Backup script to write to file? ctroyp Linux - Newbie 13 01-10-2006 06:15 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration