Exclusive file access while doing backup?

Hello!
I am hosting a minecraft server on my old 900MhZ homeserver [it DOES run really well, arch is doing an amazing job ] and I made a little bash script to daily backup the current savegame, which I run via cron:
#!/bin/bash
MC_PATH="/home/tom/mc_bukkit/dasiro"
BKP_PATH=/home/tom/_backup
if [ -d "$MC_PATH" ]; then
filename=minecraftsave_`date "+%Y-%m-%d_%H-%M-%S"`.tar.xz
tar --create --xz --file $BKP_PATH/$filename $MC_PATH
find $BKP_PATH -name "minecraftsave*" -mtime +14 | xargs rm
fi
The problem is that most often it is run I get tar: ./mc_bukkit/dasiro/region/r.-1.0.mcr: file changed as we read it.
Is it possible to "lock" the file for a few seconds while the backup is run? Maybe there is a possibility... It is no problem if the server "freezes" for a few seconds. Thank you!
Last edited by cyberius (2011-05-14 08:03:03)

Take a look at lvm and specifically lvmsnapshots.
If you have the files you wish to backup on a lvm partition, then you can create a lvm snapshot, which is a frozen snapshot of the partition. The original partition is untouched and goes about it's business.  You can then mount the snapshot like any other filesystem and make a backup of it's contents.

Similar Messages

  • What is the source file structure while doing the BDC of mm01

    What is the source file structure while doing the BDC of mm01

    Hi,
    first u create a meterial note the data u enterd in the screens.
    if u have created the material successfully then that data structure will be the source structure of the
    file.
    regards.
    Jagadeesh.

  • While doing backups, found a strange file ?

    While doing one of my daily backups, I ran into a strange file. Not quite sure what it is for, but I have never seen it there before ?
    I googled without any luck :
                   ( 1 )      ziFAr2Kf
                   ( 2 )      .buildpathUX
    Any ideas ?
    Bill Hernandez
    Plano, Texas

    Those are mosted likely some leftover temporary work files that were never cleaned up by the program that created them.
    Very unlikely something to worry about.

  • Error While Doing Backup with SuperDuper

    I bought a new hard drive and was atempting to do a backup with SuperDuper and got these messages:
    WARNING: Caught I/O exception(5): Input/output error
    | 08:32:50 AM | Info | WARNING: Source: /Library/Frameworks/LAME.framework/Versions/A/LAME, lstat(): 0
    | 08:32:50 AM | Info | WARNING: Target: /Volumes/WD USB 2/Library/Frameworks/LAME.framework/Versions/A/LAME, lstat(): 0
    | 08:32:50 AM | Info | Attempting to copy file using copyfile().
    | 08:33:32 AM | Info | Attempting to copy file using ditto.
    | 08:34:08 AM | Error | ditto: /Library/Frameworks/LAME.framework/Versions/A/./LAME: Input/output error
    Can anyone help me resolve this error? I used Disk Utility before SuperDuper and that backup also failed.
    Message was edited by: ImaVeggie

    I was trying to create a bootable backup to an external USB drive prior to installing my new internal hard drive. I simply deleted the LAME Framework folder that was giving the error and was able to complete the process. I think that had something to do with MP3 encoding, converting. Hopefully not in relation to iTunes. Anyone know?

  • How to specify the file path while doing bdc recording

    hi guys,
    using recording we specify transaction code where we enter all the details for the screen after that we get the recording program .....i have a doubt where can we specify the path for uploading a program from a local pc.......if possible can anyone provide a simple program to explain recording to upload an excel file from the system using recording

    Hi Gokul,
      You can use the following code to upload excel data into internal table.
       PARAMETERS: P_FILE LIKE RLGRAP-FILENAME.
        CALL FUNCTION 'WS_UPLOAD'
          EXPORTING
               CODEPAGE                = ' '
               FILENAME                = P_FILE
               FILETYPE                = 'DAT'
               HEADLEN                 = ' '
               LINE_EXIT               = ' '
               TRUNCLEN                = ' '
               USER_FORM               = ' '
               USER_PROG               = ' '
          IMPORTING
               FILELENGTH              =
           TABLES
                DATA_TAB                = IT_FILE
          EXCEPTIONS
               CONVERSION_ERROR        = 1
               FILE_OPEN_ERROR         = 2
               FILE_READ_ERROR         = 3
               INVALID_TABLE_WIDTH     = 4
               INVALID_TYPE            = 5
               NO_BATCH                = 6
               UNKNOWN_ERROR           = 7
               GUI_REFUSE_FILETRANSFER = 8
               CUSTOMER_ERROR          = 9
               OTHERS                  = 10
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
        CLEAR IT_FILE.
      ENDIF.
    In SAP Enterprise edition, You can use FM : GUI_UPLOAD.
    From internal table, Data will be moved to BDCDATA and continue with BDC coding.
    Reward, if useful.
    Thanks,
    USR

  • Java File access while File opened

    I have to check if a file is already opened or not under windows 9x/ME/NT/2000.
    A try give me a FileNotFoundException . I check the file and Java also modified this
    file . I don't want this to appened again, so i would accept any suggestion so that if
    files are already opened under other programs than mine, my programm will alert the user
    and say it skipped the file or something like that.
    In advance thanks a lot (sorry no more duke dollar available).

    It seems after several tests that this function is somehow buggy, and don't
    really say if a file is open with another application or not.
    I found another way : i try to rename the file, if i couldn't succeded, then the file
    is open with another application. The only problem is that this function seems to be
    a little buggy too, so sometimes it says me a file is open whereas it isn"t open.
    Hope this may help someone.

  • Error while accessing secure store: File "SecStore.properties" does not exi

    Hi ,
    I have a java desktop application, and i am trying to get a connection from a datasource deployed on one SAP AS Java, I can get the datasource succsfullly but when i try to get a connection from the DS, it throughs this exception, I put the secstore..properties file in the classpath even after that it is not happy,
    any solution/hint/light please!!!!
    com.sap.sql.log.OpenSQLException: Error while accessing secure store: File "SecStore.properties" does not exist although it should..
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:106)
         at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:145)
         at com.sap.sql.connect.OpenSQLDataSourceImpl.setDataSourceName(OpenSQLDataSourceImpl.java:226)
         at com.sap.sql.connect.OpenSQLDataSourceImpl.setDataSourceName(OpenSQLDataSourceImpl.java:197)
         at com.sap.customcode.ConflictingActionFixture.(ConflictingActionFixture.java:53)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at fit.FixtureClass.newInstance(Unknown Source)
         at fit.FixtureLoader.instantiateFixture(Unknown Source)
         at fit.FixtureLoader.instantiateFirstValidFixtureClass(Unknown Source)
         at fit.FixtureLoader.disgraceThenLoad(Unknown Source)
         at fit.Fixture.loadFixture(Unknown Source)
         at fit.Fixture.getLinkedFixtureWithArgs(Unknown Source)
         at fit.Fixture.doTables(Unknown Source)
         at fit.FitServer.process(Unknown Source)
         at fit.FitServer.run(Unknown Source)
         at fit.FitServer.main(Unknown Source)
    Caused by: com.sap.security.core.server.secstorefs.FileMissingException: File "SecStore.properties" does not exist although it should.
         at com.sap.security.core.server.secstorefs.StorageHandler.openExistingStore(StorageHandler.java:372)
         at com.sap.security.core.server.secstorefs.SecStoreFS.openExistingStore(SecStoreFS.java:1946)
         at com.sap.sql.connect.OpenSQLConnectInfo.getStore(OpenSQLConnectInfo.java:802)
         at com.sap.sql.connect.OpenSQLConnectInfo.lookup(OpenSQLConnectInfo.java:783)
         at com.sap.sql.connect.OpenSQLDataSourceImpl.setDataSourceName(OpenSQLDataSourceImpl.java:209)
         ... 18 more
    caused by

    the SecStore.key file was not there, I changed the passwd and checked the 'Encryption' on, after that my sever instance is not starting.
    Any idea?
    -Puneet

  • ORA-19870: error while restoring backup piece -- file exists in ASM

    [oracle@rs1pre92dvdbsa01 ~]$ rman target sys/c9nv9sd9t9f11e@mdm11 auxiliary /
    Recovery Manager: Release 11.2.0.1.0 - Production on Fri Oct 29 10:41:38 2010
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    connected to target database: MDM (DBID=1485385044)
    connected to auxiliary database: MDM (not mounted)
    RMAN> duplicate target database for standby;
    Starting Duplicate Db at 29-OCT-10
    using target database control file instead of recovery catalog
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=13 device type=DISK
    contents of Memory Script:
    restore clone standby controlfile;
    executing Memory Script
    Starting restore at 29-OCT-10
    using channel ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: starting datafile backup set restore
    channel ORA_AUX_DISK_1: restoring control file
    channel ORA_AUX_DISK_1: reading from backup piece +MDMDG2/mdm1/autobackup/2010_10_29/s_733654605.283.733654607
    channel ORA_AUX_DISK_1: ORA-19870: error while restoring backup piece +MDMDG2/mdm1/autobackup/2010_10_29/s_733654605.283.733654607
    ORA-19505: failed to identify file "+MDMDG2/mdm1/autobackup/2010_10_29/s_733654605.283.733654607"
    ORA-17503: ksfdopn:2 Failed to open file +MDMDG2/mdm1/autobackup/2010_10_29/s_733654605.283.733654607
    ORA-15012: ASM file '+MDMDG2/mdm1/autobackup/2010_10_29/s_733654605.283.733654607' does not exist
    failover to previous backup
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 10/29/2010 10:42:00
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06026: some targets not found - aborting restore
    RMAN-06024: no backup or copy of the control file found to restore
    RMAN>
    ASMCMD [+mdmdg2] > cd mdm1
    ASMCMD [+mdmdg2/mdm1] > ls
    CONTROLFILE/
    FLASHBACK/
    ONLINELOG/
    arch/
    autobackup/
    ASMCMD [+mdmdg2/mdm1] > cd autobackup
    ASMCMD [+mdmdg2/mdm1/autobackup] > ls
    2010_10_29/
    ASMCMD [+mdmdg2/mdm1/autobackup] > cd 2010_10_29
    ASMCMD [+mdmdg2/mdm1/autobackup/2010_10_29] > ls
    s_733654605.283.733654607
    As seen in asmcmd "s_733654605.283.733654607" file exists in +mdmdg2/mdm1/autobackup/2010_10_29 then why it is complaning that it can't find the file.
    and also How to open/view file in asmcmd

    [oracle@rs1pre91dvdbaa01 utl]$ sqlplus / as sysasm
    SQL*Plus: Release 11.2.0.1.0 Production on Fri Oct 29 13:11:44 2010
    Copyright (c) 1982, 2009, Oracle. All rights reserved.
    Connected to an idle instance.
    SQL> startup;
    ORA-01078: failure in processing system parameters
    ORA-29701: unable to connect to Cluster Synchronization Service
    I have rebooted both the RAC servers and I can't start database?
    I was under the impression that Database should be automatically started as part of Clusterware
    Please help urgent.

  • Two VMs and exclusive write access to one file

    How can one guarentee exclusive write access to a file when two vms want to write to it?
    I looked at
    http://developer.java.sun.com/developer/JDCTechTips/2003/tt0304.html#2
    However, I am not sure whether a race condition could happen or not.
    (I thinking like:
    if file is not writable, change to writeable,
    else if file is writable, wait for a while and check again.
    write what you want
    change file back to not writeable.
    Is there some OS level exclusive access thing we can take advantage of? The follow up question would be, what about system crashes?
    Thanks.

    The problem with what you describe is that two JVMs
    could discover the file is not writeable at the same
    time, and then change it to writeable. You need some
    sort of action which can only be successfully
    completed by one JVM. Here's an idea:
    Create a dummy file which represents a "lock" (only
    one JVM may hold the lock). When a JVM wants the
    lock, it attempts to delete the file. This can only
    succeed for one JVM. Once you have the lock, you do
    your business and then restore the file.http://java.sun.com/j2se/1.4/docs/api/java/io/File.html#delete()
    not bad. It's a false situation too.
    However, deadlock can happen if the other VM goes down while the lock is taken.

  • My Iphone still hanging for 9 hours while doing security backup for actualization...

    My Iphone still hanging for 9 hours while doing security backup for actualization... Can anyone help?? And also cannot find backup file..

    Now it's Wednesday (2 days since I originally posted) & my iPhone appears to have finally restored all my apps, but it still says it's restoring from iCloud backup.  If all my apps are restored, what else could it be restoring?  IS it actually restoring anything at this point, or is it still in 'glitch' mode???  I've tried turning it off & back on & it continues to say that it's restoring.

  • Rescue and Recovery Crashes While Deleting Backup Files

    I've seen many threads in regards to Rescue and Recovery crashing while deleting backup files, but no solutions were ever mentioned!  I have a T400 (Vista SP2, Intel T9400, 4GB RAM, 300 GB HD) and was quickly running out of disk space.  After finding mention of Rescue and Recovery I was able to delete some of the backups but not all.  For example I have one from 2008 (18GB) but it won't seem to delete.  I let it sit for quite a while (over night) but it still didn't delete.  Does anybody have a solution for how to get R&R to delete this files?  Or how to delete these files manually?  Thanks in advance.  

    Hi,
    in this situation I assume, you are using the GUI for the deletiong of the RnR Backups.
    What I always prefer is the rrcmd.exe which you can use with the "delete" whicht so that the backups that you want to will be deleted.
    Cheers

  • ERROR: file can not be accessed or does not exist

    I have a client online at this very moment that just went on and did all their page edits... about 2 hours of work for him.
    He went to save the file & received the error "...file can not be accessed or does not exist, Error" (no error number or anything. Here are the steps he took:
    Edit page
    Save ... received error
    Done... received same error
    Call me in panic
    Anyone???

    Hello Tommy,
    The editing session should not time out for 24 hours for a normal login. The period is even longer if “remember me” was checked at login... And if the session timed out, you should have been prompted with the login dialog, not thrown an error.
    I've sent you a private message regarding further troubleshooting.
    Best regards,
    Corey

  • Error while doing File to File Scenario

    All,
    I am trying a simple file to file scenario - where xi picks up the file from a location and maps the message and dumps it in another location.
    I am Getting the below error while doing the same .........
    Time Stamp Status Description
    2009-03-30 14:30:24 Success Channel Test_send_cc: Send binary file  "d:\input\input.xml". Size 203 with QoS EO
    2009-03-30 14:30:24 Success Application attempting to send an XI message asynchronously using connection AFW.
    2009-03-30 14:30:24 Success Trying to put the message into the send queue.
    2009-03-30 14:30:24 Success Message successfully put into the queue.
    2009-03-30 14:30:24 Success The application sent the message asynchronously using connection AFW. Returning to application.
    2009-03-30 14:30:24 Error Attempt to delete file "d:\input\input.xml" after processing failed. Retry
    2009-03-30 14:30:24 Success The message was successfully retrieved from the send queue.
    2009-03-30 14:30:24 Success The message status set to DLNG.
    *+2009-03-30 14:30:24 Error Transmitting the message to endpoint http://filip:8000/sap/xi/engine?type=entry using connection AFW failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Received HTTP response code 401 : Unauthorized.*
    2009-03-30 14:30:24 Success The asynchronous message was successfully scheduled to be delivered at Mon Mar 30 14:35:24 GMT+05:30 2009.
    And i cant see the meesages using the SXMB_MONI trasaction
    please help me resolve ths issue
    Regards,
    Mahesh.
    Edited by: mahesh uma on May 3, 2008 2:12 PM

    Hi Uma,
    Go through this links::
    Hope these links are useful to you..
    Urgent: Message not transmitted from AFW to Integration server
    Error with huge file
    File to JDBC error
    Thanks,
    Satya Kumar..

  • Unique Error while doing hot backup Cloning!

    Dear All,
    I am using EBS 11.5.10.2 with DB 9.2.0.6.
    I am doing hot backup cloning by referring *[Cloning Oracle Application 11i /R12 with Rapid Clone - Database (9i/10g/11g) Using Hot Backup on Open Database|https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=760772.1]*
    I am facing a unique issue, when I run adcfgclone.pl dbconfig <my_context_file>, application of my Production Server start misbehaving and it gives me an error:
    Node Id does not exist for the current application server id.When I check the FND_NODE table I found that there server id was empty in it.
    I have to run than run the following steps as the resolution:
    1. Shutdown all the services.
    2. EXEC FND_CONC_CLONE.SETUP_CLEAN;
    3. COMMIT;
    4. Run AutoConfig on all tiers, firstly on the DB tier and then the APPS tiers,to repopulate the required system tables.
    5.start all the services and verify the issue.
    Than application behaves normally.
    Is there any additional step to be followed while Hot Backup Cloning other than mentioned in the above mentioned ML Doc?
    Please suggest,
    Anchorage :)

    I am facing a unique issue, when I run adcfgclone.pl dbconfig <my_context_file>, application of my Production Server start misbehaving and it gives me an error:
    Node Id does not exist for the current application server id.Where did you get this error?
    This is very strange, how come this happens in Production, when you are doing cloning in TEST/DEV instance.
    Is there any additional step to be followed while Hot Backup Cloning other than mentioned in the above mentioned ML Doc?I feel there are no other additional steps, as I Recently did successfully hotbackup cloning using the same document.

  • HT1414 I lost all my data while doing the latest software upgrade, how do I get it back if I dont have a backup on iTunes?

    I lost all my data while doing the latest software upgrade, how do I get it back if I dont have a backup on iTunes?

    If you don't have a backup, then all your pics/text/notes are gone.
    You can sync back music and app.  If you were syncing your contacts with a program in itunes, then you'll get that back.
    Not sure why you didn't do a backup, especially prior to doing an upgrade.

Maybe you are looking for

  • How to install custom XMP Get Info Panels in Adobe Bridge CC

    Adobe changed their way they store the custom XMP Get Info Panels in Adobe Bridge CC. Check out this blog to see how you can install the XMP Get Info Panels that you used in Adobe Bridge CS6 in Adobe Bridge CC: http://www.databasepublish.com/blog/ins

  • How to capture 480/60p?

    I have stupidly in a hast, like how all problems start, I set my JVC GY-HD100 to shoot in HDV-SD60P and from the manual it tells me i have recorded in 480/60p i have spent hours trying to bring it into FCP with no luck. I played with my settings and

  • Error during up2date oracle-validated gives segmentation fault

    Hi all, I am trying to run the up2date oracle-validated command for Oracle Enterprise Linux 5 64 bit and it fails on memory dump errors. [root@tstdb01]# up2date oracle-validated Fetching Obsoletes list for channel: el5_x86_64_latest... Fetching rpm h

  • If I chance songs lenght,it's not reflected in playlist lenght?

    Hi! I am using the latest iTunes 6.0.4.2. When I right klick in iTunes playlist songs and go to the Get info -> Options and alter the song's start time + end time, it doesn't reflect to the total playlist time... has anyone else noticed this? I fear

  • Sample Quiz module needed

    can someone show me a quiz module (using radio button as choices).. i really have no idea how to catch the data from selected radio button then compare it to right answer.. i need it for the assessment of my enrollment system..