python-delta-tar
8 years agofix error found by pylint
Christian Herdtweck [Wed, 22 Jun 2016 15:14:15 +0000]
fix error found by pylint

8 years agoRename design document so pylint3 doesn't pick it up
Thomas Jarosch [Thu, 23 Jun 2016 10:31:11 +0000]
Rename design document so pylint3 doesn't pick it up

8 years agoImplement cache for pwd.getpwuid() and grp.getgrgid()
Thomas Jarosch [Thu, 23 Jun 2016 08:08:16 +0000]
Implement cache for pwd.getpwuid() and grp.getgrgid()

Those functions always parse /etc/passwd and we
look up the owner for each file we backup.

This change is only relevant when creating full backups.
Speed up with ~1.000.000 emails is 11%.

8 years agoFix 'directory' type when iterating tar archives without index
Thomas Jarosch [Tue, 21 Jun 2016 08:01:35 +0000]
Fix 'directory' type when iterating tar archives without index

'dir' is not used anywhere in the code base.

8 years agouse the "& 0xFFFfff" after all crc32 calculations
Christian Herdtweck [Mon, 20 Jun 2016 07:43:54 +0000]
use the "& 0xFFFfff" after all crc32 calculations

8 years agoIncrease release to 1.3
Thomas Jarosch [Fri, 17 Jun 2016 15:39:13 +0000]
Increase release to 1.3

Also switch group from Intranator to Intra2net

8 years agoimprove one more unittest: raise proper assertion instead of failing with non-existen...
Christian Herdtweck [Fri, 17 Jun 2016 14:02:27 +0000]
improve one more unittest: raise proper assertion instead of failing with non-existent variable

8 years agoadjust unittests in test_deltatar
Christian Herdtweck [Fri, 17 Jun 2016 14:01:37 +0000]
adjust unittests in test_deltatar

8 years agocorrect a comment, add more info to log message
Christian Herdtweck [Fri, 17 Jun 2016 13:29:19 +0000]
correct a comment, add more info to log message

8 years agoadjust filter_path: also remove trailing os.sep
Christian Herdtweck [Fri, 17 Jun 2016 13:28:34 +0000]
adjust filter_path: also remove trailing os.sep

8 years agofix strip_base_dir argument for DeltaTar._recursive_walk_dir: check for os.sep
Christian Herdtweck [Fri, 17 Jun 2016 13:28:09 +0000]
fix strip_base_dir argument for DeltaTar._recursive_walk_dir: check for os.sep

8 years agosimplify DeltaTar._recursive_walk_dir
Christian Herdtweck [Fri, 17 Jun 2016 09:59:27 +0000]
simplify DeltaTar._recursive_walk_dir

(had called os.path.isdir and filter_path twice on each file directly
 after another)

8 years agohad forgotten a few tarobj.close and os.unlink(temp_file) in new tests
Christian Herdtweck [Fri, 17 Jun 2016 09:56:24 +0000]
had forgotten a few tarobj.close and os.unlink(temp_file) in new tests

8 years agochange one output, make 2 variables to testing routine arguments
Christian Herdtweck [Fri, 17 Jun 2016 07:31:50 +0000]
change one output, make 2 variables to testing routine arguments

8 years agouse KiB, MiB (factor 1024) instead of KB, MB (factor 1000)
Christian Herdtweck [Fri, 17 Jun 2016 07:31:16 +0000]
use KiB, MiB (factor 1024) instead of KB, MB (factor 1000)

8 years agofix search for file with impossible size (had forgotten that volume_size is in MB)
Christian Herdtweck [Wed, 15 Jun 2016 13:07:24 +0000]
fix search for file with impossible size (had forgotten that volume_size is in MB)

8 years agoIncrease version to 1.2
Thomas Jarosch [Wed, 15 Jun 2016 12:28:38 +0000]
Increase version to 1.2

8 years agoMerge branch 'fix-compression-size'
Thomas Jarosch [Wed, 15 Jun 2016 12:18:33 +0000]
Merge branch 'fix-compression-size'

The new code will give final tar file sizes
close to the volume size even when using compression.

8 years agoensure temp file is deleted; add some comments about results
Christian Herdtweck [Wed, 15 Jun 2016 09:39:41 +0000]
ensure temp file is deleted; add some comments about results

8 years agoadded performance test script
Christian Herdtweck [Wed, 15 Jun 2016 09:19:09 +0000]
added performance test script

8 years agoadded minimum file size arg to find_random_files
Christian Herdtweck [Wed, 15 Jun 2016 09:18:55 +0000]
added minimum file size arg to find_random_files

should make returned files more realistic

8 years agoreduce time wasted on _dbg output: format string only when it is actually printed
Christian Herdtweck [Wed, 15 Jun 2016 07:55:16 +0000]
reduce time wasted on _dbg output: format string only when it is actually printed

8 years agoremove _dbg(str.format(args)) from performance-sensitive loop in addfile
Christian Herdtweck [Wed, 15 Jun 2016 07:54:02 +0000]
remove _dbg(str.format(args)) from performance-sensitive loop in addfile

8 years agoadded some more comments
Christian Herdtweck [Wed, 15 Jun 2016 07:53:48 +0000]
added some more comments

8 years agoadd unittest that runs one of the many multivolume compression size tests
Christian Herdtweck [Tue, 14 Jun 2016 10:28:32 +0000]
add unittest that runs one of the many multivolume compression size tests

8 years agocreated another test for multivolume compression size
Christian Herdtweck [Mon, 13 Jun 2016 11:07:08 +0000]
created another test for multivolume compression size

8 years agochanged debug output level of the debug output I added earlier
Christian Herdtweck [Tue, 14 Jun 2016 09:59:03 +0000]
changed debug output level of the debug output I added earlier

8 years agoremoved some debug output
Christian Herdtweck [Mon, 13 Jun 2016 11:06:38 +0000]
removed some debug output

8 years agofix ValueError message (otherwise '*' is interpreted as string repetition)
Christian Herdtweck [Mon, 13 Jun 2016 11:06:28 +0000]
fix ValueError message (otherwise '*' is interpreted as string repetition)

8 years agoensure max_volume_size is int or None
Christian Herdtweck [Mon, 13 Jun 2016 11:05:50 +0000]
ensure max_volume_size is int or None

8 years agoskip one test with known failure
Christian Herdtweck [Fri, 10 Jun 2016 12:34:05 +0000]
skip one test with known failure

8 years agocorrect number of compressed backup volumes in tests
Christian Herdtweck [Fri, 10 Jun 2016 12:32:38 +0000]
correct number of compressed backup volumes in tests

8 years agoadded class variable MODE_COMPRESS to test_deltatar unittests
Christian Herdtweck [Fri, 10 Jun 2016 12:18:33 +0000]
added class variable MODE_COMPRESS to test_deltatar unittests

8 years agodo a proper unittest.skip if test is not run
Christian Herdtweck [Fri, 10 Jun 2016 12:17:33 +0000]
do a proper unittest.skip if test is not run

8 years agoremove print()s in unittest test_multivol
Christian Herdtweck [Fri, 10 Jun 2016 12:15:30 +0000]
remove print()s in unittest test_multivol

8 years agoremove unused import
Christian Herdtweck [Fri, 10 Jun 2016 08:09:33 +0000]
remove unused import

8 years agoextend valid range of sizes for sample.tar.gz file
Christian Herdtweck [Fri, 10 Jun 2016 08:09:24 +0000]
extend valid range of sizes for sample.tar.gz file

8 years agoadded new unittest test_multivol_compress with bigger random-data file
Christian Herdtweck [Thu, 9 Jun 2016 16:01:37 +0000]
added new unittest test_multivol_compress with bigger random-data file

8 years agorenamed unittest test_multivol_compress to test_compress_single (compresses to single...
Christian Herdtweck [Thu, 9 Jun 2016 16:01:12 +0000]
renamed unittest test_multivol_compress to test_compress_single (compresses to single volume)

8 years agoadded a few debug messages to addfile and open_volume
Christian Herdtweck [Thu, 9 Jun 2016 15:58:39 +0000]
added a few debug messages to addfile and open_volume

8 years agochanged TarFile.addfile to get better sized volumes if compressing
Christian Herdtweck [Thu, 9 Jun 2016 15:58:04 +0000]
changed TarFile.addfile to get better sized volumes if compressing

8 years agocreated a 2nd TarFile._size_left: one for file and one for stream
Christian Herdtweck [Thu, 9 Jun 2016 15:56:00 +0000]
created a 2nd TarFile._size_left: one for file and one for stream

8 years agofix unittest's create_pseudo_random_file: do return file name as docu says
Christian Herdtweck [Thu, 9 Jun 2016 15:54:51 +0000]
fix unittest's create_pseudo_random_file: do return file name as docu says

author of that module seems to never have heard of the tempfile module in
python stdlib!

8 years agoimproved unittest's create file: do not gather GB in memory before writing
Christian Herdtweck [Thu, 9 Jun 2016 15:53:54 +0000]
improved unittest's create file: do not gather GB in memory before writing

8 years agoclean up in unittest: remove size_test_* files
Christian Herdtweck [Thu, 9 Jun 2016 15:52:58 +0000]
clean up in unittest: remove size_test_* files

8 years agoclean up in unittest: remove unused imports
Christian Herdtweck [Thu, 9 Jun 2016 15:52:41 +0000]
clean up in unittest: remove unused imports

8 years agomake file size test faster by removing 16GB test file
Christian Herdtweck [Thu, 9 Jun 2016 09:23:33 +0000]
make file size test faster by removing 16GB test file

8 years agocreate unittest for warning
Christian Herdtweck [Thu, 9 Jun 2016 09:23:09 +0000]
create unittest for warning

8 years agowarn if trying to compress/encrypt multivolume with mode w:...
Christian Herdtweck [Thu, 9 Jun 2016 09:22:58 +0000]
warn if trying to compress/encrypt multivolume with mode w:...

8 years agoadjust file-size-estimation unittest; add an actual test to unittest
Christian Herdtweck [Thu, 9 Jun 2016 09:09:41 +0000]
adjust file-size-estimation unittest; add an actual test to unittest

8 years agostarted a unittest for multi-volume with compression
Christian Herdtweck [Wed, 8 Jun 2016 15:50:25 +0000]
started a unittest for multi-volume with compression

8 years agocreated unittest for get_file_size
Christian Herdtweck [Wed, 8 Jun 2016 15:48:23 +0000]
created unittest for get_file_size

8 years agoadded function get_file_size and var _file_size to _Stream
Christian Herdtweck [Wed, 8 Jun 2016 15:46:49 +0000]
added function get_file_size and var _file_size to _Stream

8 years agochanged some comments, corrected one indent
Christian Herdtweck [Wed, 8 Jun 2016 15:46:02 +0000]
changed some comments, corrected one indent

8 years agodelete(): Don't crash on removing symlinks to directories
Thomas Jarosch [Wed, 15 Jun 2016 06:42:02 +0000]
delete(): Don't crash on removing symlinks to directories

shutil.rmtree() will refuse to follow symlinks.
-> just call os.unlink() for symlinks.

9 years agoRevert "added arguments for permissions of created dirs and files to deltatar.create_...
Christian Herdtweck [Thu, 7 Apr 2016 13:48:27 +0000]
Revert "added arguments for permissions of created dirs and files to deltatar.create_full/diff_backup"

This reverts commit 8db5dd46357def656b84019cded8aed8f0626a03.

(simpler and more important to have UI deal with unclean input)

9 years agoadded arguments for permissions of created dirs and files to deltatar.create_full...
Christian Herdtweck [Wed, 6 Apr 2016 16:04:46 +0000]
added arguments for permissions of created dirs and files to deltatar.create_full/diff_backup

9 years agoIncrease version to 1.1
Thomas Jarosch [Fri, 3 Jul 2015 19:34:05 +0000]
Increase version to 1.1

Reflect the filename changes and
a few other bells and whistles.

9 years agoSwitch produced filenames from YY-mm-dd to YYYY-mm-dd
Thomas Jarosch [Fri, 3 Jul 2015 19:24:14 +0000]
Switch produced filenames from YY-mm-dd to YYYY-mm-dd

9 years agoAbility to the run the unit tests without a .git directory
Thomas Jarosch [Fri, 3 Jul 2015 19:20:24 +0000]
Ability to the run the unit tests without a .git directory

Useful for executing the tests during every rpm build.

9 years agoInclude unit test files in source tarball
Thomas Jarosch [Fri, 3 Jul 2015 19:06:26 +0000]
Include unit test files in source tarball

Don't install them though. Just needed for
running the unit tests during the rpm binary build.

9 years agoUnit test: Skip multivolume split test for modes that don't support it.
Thomas Jarosch [Fri, 3 Jul 2015 15:57:49 +0000]
Unit test: Skip multivolume split test for modes that don't support it.

Actual code borrowed from test_restore_from_index().
Same code in test_restore_multivol_from_index() and a few others.

All unit tests running again.

9 years agoUnit test: Fix _equal_stat_dicts() invocation
Thomas Jarosch [Fri, 3 Jul 2015 15:24:14 +0000]
Unit test: Fix _equal_stat_dicts() invocation

The jsonize_path_iterator() generator returns a tuple
with the wanted dictionary as the first element.

9 years agoPass on 'compresslevel' for gzip / bzip2 compressed archives only
Thomas Jarosch [Fri, 3 Jul 2015 14:35:57 +0000]
Pass on 'compresslevel' for gzip / bzip2 compressed archives only

Otherwise we crash when opening plain tar files for writing:

    TypeError: taropen() takes from 2 to 4 positional arguments but 5 were given

First part of the unit test fix. Verified with debug statements
in gzopen() that passing on the parameter still works.

10 years agoAdd comments about the callback param to the docs
Samir Aguiar [Wed, 22 Apr 2015 10:52:42 +0000]
Add comments about the callback param to the docs

Also, some others cosmetic changes.

10 years agoAdd a callback function to the restore process
Samir Aguiar [Wed, 22 Apr 2015 08:15:32 +0000]
Add a callback function to the restore process

By having a function called for every file
that's about to be restore, we can keep track
of the progress of the extraction.

10 years agoadding an integration test that uses create_pseudo_random_files to create a determini...
Eduardo Robles Elvira [Thu, 7 Aug 2014 09:38:14 +0000]
adding an integration test that uses create_pseudo_random_files to create a deterministic files and directories tree and then uses delta-tar with the run_benchmark script.

10 years agoadding zlib and zlib-blocks tests
Eduardo Robles Elvira [Fri, 1 Aug 2014 12:45:35 +0000]
adding zlib and zlib-blocks tests

10 years agoimproving benchmark tests and their documentation
Eduardo Robles Elvira [Tue, 22 Jul 2014 17:46:12 +0000]
improving benchmark tests and their documentation

10 years agoadding support to set the gzip compression level in tarfile
Eduardo Robles Elvira [Tue, 22 Jul 2014 17:45:22 +0000]
adding support to set the gzip compression level in tarfile

10 years agoMove README.txt to the docs folder. Better name
Thomas Jarosch [Wed, 16 Jul 2014 14:39:58 +0000]
Move README.txt to the docs folder. Better name

10 years agoAdded profiler test for tarfile and zlib.
Victor Ramirez [Wed, 16 Jul 2014 14:14:45 +0000]
Added profiler test for tarfile and zlib.

10 years agoAdded test to test multivolume corruption at restore
Daniel Garcia Moreno [Tue, 1 Jul 2014 18:16:52 +0000]
Added test to test multivolume corruption at restore

10 years agoFixed "random" file corruption in multivol restore
Daniel Garcia Moreno [Mon, 30 Jun 2014 07:31:03 +0000]
Fixed "random" file corruption in multivol restore

Files splitted between two volumes were not valid in the restored backup.
The first part was okay but the second part was garbage. The problem was
that we don't set correctly the volume number so the second part always was
from the first tar file.

We were checking member variable, but this variable changes before, so I've
added a new bool variable "ismember" that don't change with member.

10 years agofix delete current file when doesnt match when restoring, logging was not being done...
Eduardo Robles Elvira [Tue, 24 Jun 2014 09:35:42 +0000]
fix delete current file when doesnt match when restoring, logging was not being done correctly (crash)

10 years agoallow to set a new_volume_handler in iterate_tar_path, but make it optional
Eduardo Robles Elvira [Mon, 23 Jun 2014 12:11:35 +0000]
allow to set a new_volume_handler in iterate_tar_path, but make it optional

10 years agosmall formating change
Eduardo Robles Elvira [Sun, 22 Jun 2014 22:19:17 +0000]
small formating change

10 years agoFix typo in comment
Thomas Jarosch [Mon, 16 Jun 2014 08:57:32 +0000]
Fix typo in comment

11 years agofix typo error, variable should be named beginning_size
Eduardo Robles Elvira [Wed, 19 Mar 2014 16:50:18 +0000]
fix typo error, variable should be named beginning_size

11 years agomaking testbackup.py work
Eduardo Robles Elvira [Wed, 19 Mar 2014 12:16:29 +0000]
making testbackup.py work

11 years agoadding more easy to understand diff backup debug output
Eduardo Robles Elvira [Tue, 11 Mar 2014 12:27:10 +0000]
adding more easy to understand diff backup debug output

11 years agofix debug logging in diff mode
Eduardo Robles Elvira [Fri, 7 Mar 2014 13:15:57 +0000]
fix debug logging in diff mode

11 years agoadd function to easily get the extension used for indexes
Eduardo Robles Elvira [Tue, 11 Feb 2014 10:51:37 +0000]
add function to easily get the extension used for indexes

11 years agoIgnore files created by setup.sh
Thomas Jarosch [Wed, 5 Feb 2014 16:22:08 +0000]
Ignore files created by setup.sh

11 years agoadding some missing debug lines
Eduardo Robles Elvira [Wed, 5 Feb 2014 10:21:10 +0000]
adding some missing debug lines

11 years agoadding setup files to create an rpm for python-delta-tar
Eduardo Robles Elvira [Mon, 20 Jan 2014 09:07:16 +0000]
adding setup files to create an rpm for python-delta-tar

11 years agoremoving unused vars
Eduardo Robles Elvira [Mon, 20 Jan 2014 09:05:29 +0000]
removing unused vars

11 years agoderefering backed up files for now
Eduardo Robles Elvira [Thu, 26 Dec 2013 13:49:07 +0000]
derefering backed up files for now

11 years agomissing change from string to bytes join
Eduardo Robles Elvira [Sat, 7 Dec 2013 10:29:27 +0000]
missing change from string to bytes join

11 years agoadding support for adding extra data to deltatar indexes
Eduardo Robles Elvira [Thu, 14 Nov 2013 18:54:14 +0000]
adding support for adding extra data to deltatar indexes

11 years agoTest compatible with tar 1.22 (intranator version)
Daniel Garcia Moreno [Wed, 13 Nov 2013 13:05:12 +0000]
Test compatible with tar 1.22 (intranator version)

11 years agoUsing python3 instead of python in tests system calls
Daniel Garcia Moreno [Wed, 13 Nov 2013 12:57:07 +0000]
Using python3 instead of python in tests system calls

11 years agoadding header and move to python 3
Eduardo Robles Elvira [Mon, 11 Nov 2013 09:00:34 +0000]
adding header and move to python 3

11 years agoadding python3 headers
Eduardo Robles Elvira [Mon, 11 Nov 2013 09:00:19 +0000]
adding python3 headers

11 years agofixing another file not closed warning on new vol handler and special case where...
Eduardo Robles Elvira [Wed, 6 Nov 2013 11:51:39 +0000]
fixing another file not closed warning on new vol handler and special case where the last file in a multivolume tar was being repeated in the tar index iterator

11 years agofixing some warnings in python3 from dereferenced but unclosed files
Eduardo Robles Elvira [Wed, 6 Nov 2013 11:51:00 +0000]
fixing some warnings in python3 from dereferenced but unclosed files

11 years agofixing open mode for updating the file to r+b
Eduardo Robles Elvira [Wed, 6 Nov 2013 11:49:36 +0000]
fixing open mode for updating the file to r+b

11 years agoclosing also volume files on cleanup
Eduardo Robles Elvira [Mon, 4 Nov 2013 08:08:56 +0000]
closing also volume files on cleanup

11 years agoinitial port to python 3, not finished
Eduardo Robles Elvira [Mon, 4 Nov 2013 07:50:55 +0000]
initial port to python 3, not finished

11 years agoignore the PowmInsecureWarning warning given by libgmp4 because it doesn't affect...
Eduardo Robles Elvira [Tue, 22 Oct 2013 10:38:38 +0000]
ignore the PowmInsecureWarning warning given by libgmp4 because it doesn't affect our code