Module help
[hide private]
[frames] | no frames]

Module help

source code

PYBAG - Crossplatform files synchronization and backup portable tools.

About.

This program implements portable bag and is intended for fast synchronization and backup.

It let's you use a portable digital storage devace to carry your electronic documents similar to the way you can use a bag to carry paper documents.

You can synchronize the bag with your original files easily. If a synchronization conflict occurs, it will be reported. You can specify rules for automatic conflict resolution.

With PYBAG, you can backup files and synchronize any changes made to the original files with the bag. The synchronization process will only copy changed files.

The program is cross-platform and independent from the OS and filesystem. You may easily synchronize files between Windows and Linux, for example. Symbolic links are supported on all systems (if the OS or filesystem does not support symlinks, then they are emulated).

This program has a GUI and a command line interface.

Project page: http://pybag.sourceforge.net

Bugs trucker: http://sourceforge.net/tracker/?group_id=258722&atid=1129796

Requiraments.

Python 2.5.1 ... 2.7 ....

For GUI also required:

wxPython 2.8.10 +

General.

PYBAG copy all you files and folders into "./pybagfiles" folder. Information about all entities in "pybagfiles" folder written into DB "./pybag.db" - ziped text file. In DB saves files in bag size, modify date, crc32 for all files in bag. In DB files placed in next format:

   DB_VERSION_MARKER DB_VERSION
   F SIZE MDATE CRC32 path_to_file1_in_pybagfiles link_point1
   F SIZE MDATE CRC32 path_to_file2_in_pybagfiles link_point2
   ... and so on.

All lines must end with newline, where:

Also have "pybag.cfg" file where saved preferences. Format is:

Directory structure.

Timeshift.

In several conditions (for example when synchronize Windows and Flash-FAT) you may have problems with daylight saving. Details - you synchronize all you files in evening and in night was changet time for daylight saving. In the morning you found that all you files was changed (modification date between bag and origin different about 3600 seconds)!!! This is bad do copy all files. You can use "timeshift" operation instead real copying. Timeshift is only change modification (and access) date. "Timeshift to bag" mean that for all marked files in bag will be set modification date same as in origin. "Timeshift to origin" mean that for all marked files in origin will be set modification date same as in bag.

In CLI interface you can use "-y" option for set timeshift manualy or use action "tsbag", "tsorigin", "tsreset" for set (reset) timeshift by template. In GUI you can use menu "Action->Timeshift-> ... " for set timeshift by template. Set timeshift by template means that you specify file which needs in timeshift and it become template - calculated time difference from this file used for all other files.

Command line.

pybag.py --command -option1 -option2 argument1 argument2 ...

Warning: At once may be executed only one command.

Recomendation: Use emulation mode -m1 befor real files operation (exclude --dist). For real file operation you need use option -m0.

Commands.

Common options:

This options may be used for all command.

GUI.

See GUI description in manual.


Version: 0.5.0

License: Copyright (c) 2007 ... 2019, Mazhugin Aleksey All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Mazhugin Aleksey nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Variables [hide private]
  __license__ = ...
License.
  __header__ = u'...
Header.
  __about__ = ...
About.
  _usage = ...
Usage information.
  _tips = [u'All you changes and preferences will be saved only ...
  __package__ = None

Imports: __year__, __year_start__


Variables Details [hide private]

__license__

License.

Value:
u'''
Copyright (c) 2007 ... 2019, Mazhugin Aleksey

All rights reserved.

Redistribution and use in source and binary forms, with or without mod\
ification,
are permitted provided that the following conditions are met:
...

__header__

Header.

Value:
u'''<G>
    ###########################################
    #           ***   P Y B A G   ***         #
    #              version:  0.5.0            #
    #  Copyright (c) 2019, Mazhugin Aleksey   #
    ###########################################
</G>'''

__about__

About.

Value:
u'''
                  <C>About.</C>
    <C>------------------------------------</C>
<g>PYBAG</g> - Crossplatform files synchronization and backup portable\
 tools.

  This program implements portable bag and is intended for fast
synchronization and backup.
...

_usage

Usage information.

Value:
u'''
                  <C>Usage.</C>
    <C>------------------------------------</C>

Command line help. For GUI see manual.

<W>pybag.py --command -option1 -option2 argument1 argument2 ...</W> 
    
...

_tips

Value:
[u'All you changes and preferences will be saved only if "Emulation mo\
de" turn off.',
 u'You can hide/show columns in list in menu when click right mouse bu\
tton on the columns header.',
 u'If you use any root only for backup then you can mark it in prefere\
nces as "Backup" and synchronization will be up 2 times faster.',
 u'In preferences you can adjust default filters for items list.',
 u'If you click right mouse button on column header then you can move \
...