Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How i can compress subdirectory and move to other disk?  (Read 2783 times)

0 Members and 1 Guest are viewing this topic.

TosunPASA

    Topic Starter


    Rookie

    • Experience: Beginner
    • OS: Windows 8
    How i can compress subdirectory and move to other disk?
    « on: December 10, 2016, 06:29:34 PM »
    Hey guys

    i am using RAR.exe
    and cobian backup program..
    cobian running hourly my batch file for backup copy (my DBF files and index files) to created backup dir with timestampped

    backup directory is...
    c:\Backup\Data

    my sub directory name style
    SUB1_2016_%date%_%time%
    SUB2_2015_%date%_%time%
    ...

    cobian creating new backup hourly with my batch copy files..
    why copying? cant create compressed files with cobian on users working (24h program working)

    what i will do?
    i will add new session to cobian daily.
    i will do all subdirectory will compress with RAR.exe
    and i will move to all rar files to external disk is path e:\Data\
    and i will delete subdirectory after move rar files... or
    if i can do delete compressed subdirectory will be good.. but dont know rar parameters on command lines

    todays i am making everythings with manual after cobian hourly backup

    thx

    DaveLembke



      Sage
    • Thanked: 662
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: How i can compress subdirectory and move to other disk?
    « Reply #1 on: December 11, 2016, 07:19:25 AM »
    So you want to have hourly backups of your database and store them compressed to save space, and people are using this database while you want to back it up at the same time. Thats tricky. I have worked with mySQL before and its best that no database transactions be happening while the database is being backed up. Reason behind this is that you could be backing up a partial transaction. Partial transaction is when the database is being backed up and at the same time someone is making changes to it, adding entries, changing values etc, and the backup and transaction of the user conflict to where only some of the data that they entered or changed is saved under that backup interval. For whatever transaction is happening during the backup you have the potential for corruption if you ever went to restore the database from this saved state in which there is only a partial of all data that was manipulated during that transaction and backup overlap.

    Safest method would be to have a mirror database going on at the same time, the mirror database that clones the data of the actual database at a timed interval where you create your hourly backups off of. This other database does not have transactions with users and so the only time transactions happen are when it calls to replicate its database with that of the master database that everyone interacts with. This is the method I would go with to avoid a transaction occurring while the backup is happening. Transactional databases are pretty bulletproof but a backup at the same time that its in use, I try to avoid personally.

    When i worked for a food store I had a setup like this where a mirror of the database updated every 15 minutes so that the maximum data loss was for a 15 minute span. I never went with hourly backups but could have if I wanted to. We just ran a daily backup after midnight for the start of the next day. We had the master go down hard when RAID set broke once and I was able to restore the master from the mirror in under 10 minutes over 100mbps network connection. Ran a SQL Dump and then pushed the AllDatabases dump file to the fixed master.

    http://mysqlserverteam.com/creating-and-restoring-database-backups-with-mysqldump-and-mysql-enterprise-backup-part-1-of-2/

    TosunPASA

      Topic Starter


      Rookie

      • Experience: Beginner
      • OS: Windows 8
      Re: How i can compress subdirectory and move to other disk?
      « Reply #2 on: December 11, 2016, 01:52:35 PM »
      Hello Dave

      using foxpro dos dbf files...

      mean... cant do export.. only copy... or disconnect all users for backup

      i am copying files with copy command on dos screen
      after i need auto compress files and wanna move to external usb disk
      weekly i am changing disk for security but... only hourly copy auto with cobian program
      others.. compress and move doing manuely

      i need new batch for compress after move to usb

      i am not coder.. sorry

      patio

      • Moderator


      • Genius
      • Maud' Dib
      • Thanked: 1769
        • Yes
      • Experience: Beginner
      • OS: Windows 7
      Re: How i can compress subdirectory and move to other disk?
      « Reply #3 on: December 11, 2016, 02:44:14 PM »
      Sub-directory backup may be the issue here...
      " Anyone who goes to a psychiatrist should have his head examined. "