python-delta-tar
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

11 years agoadding support for filtering via whitelist with -inc
Eduardo Robles Elvira [Fri, 18 Oct 2013 10:08:04 +0000]
adding support for filtering via whitelist with -inc

11 years agosome unit tests were only failing when run with superuser, because only then chown...
Eduardo Robles Elvira [Fri, 18 Oct 2013 09:07:56 +0000]
some unit tests were only failing when run with superuser, because only then chown can be called and had not been properly tested

11 years agofixing aes only mode: it turns out we were not closing correctly the aes stream
Eduardo Robles Elvira [Thu, 17 Oct 2013 18:21:42 +0000]
fixing aes only mode: it turns out we were not closing correctly the aes stream

11 years agoremoving some unnecesary over-optimizations like running the gc manually or deleting...
Eduardo Robles Elvira [Sat, 12 Oct 2013 08:18:00 +0000]
removing some unnecesary over-optimizations like running the gc manually or deleting stat dict

optimization memory usage during restore by saving dir perms in a specific class with only the needed data

11 years agostart working on AES-only delta tar mode, with no encryption. some tests still fail
Eduardo Robles Elvira [Wed, 9 Oct 2013 09:56:09 +0000]
start working on AES-only delta tar mode, with no encryption. some tests still fail

11 years agoremoving references to dowser, comment pytracemalloc usage, very useful though painfu...
Eduardo Robles Elvira [Wed, 9 Oct 2013 09:55:38 +0000]
removing references to dowser, comment pytracemalloc usage, very useful though painful to setup tool to trace memory usage

11 years agofixing unit test where only even lines where being processed
Eduardo Robles Elvira [Wed, 9 Oct 2013 09:54:42 +0000]
fixing unit test where only even lines where being processed

11 years agofixing memory leaks, now memory usage remains nearly constant when creating a full...
Eduardo Robles Elvira [Wed, 9 Oct 2013 09:52:02 +0000]
fixing memory leaks, now memory usage remains nearly constant when creating a full backup

11 years agoreducing leaks in tarfile by allowing not to store files in self.members
Eduardo Robles Elvira [Thu, 3 Oct 2013 14:17:17 +0000]
reducing leaks in tarfile by allowing not to store files in self.members

11 years agofixing last two unit tests bugs, realted to multivol and tar iterator
Eduardo Robles Elvira [Mon, 30 Sep 2013 07:58:55 +0000]
fixing last two unit tests bugs, realted to multivol and tar iterator

* when a file was split in two volumes, the tarinfo from the second volume was read twice
* tar iterator failed when reading an empty volume because instead of returning None, it tried to read position 0 and when reading from _Stream thats not allowed

11 years agofixing bug in a deltatar that excepts two vols for a backup of .git, which might...
Eduardo Robles Elvira [Mon, 30 Sep 2013 07:58:42 +0000]
fixing bug in a deltatar that excepts two vols for a backup of .git, which might not be needed

11 years agomigrating tar restore to use the same code as index restore
Eduardo Robles Elvira [Sat, 28 Sep 2013 10:29:30 +0000]
migrating tar restore to use the same code as index restore

previous commit was a mess because it mixed two commits, my fault.
it mixed both the mtime directories fix and the generalization of
tar restore with index restore.

this commit continues the work towards this generalization, fixing
the TarPathIterator (which was just not tested), doing the removed
os.chdir in restore_backup (which resulted in cwd data loss when
running the tests), fixing also the indentation at the end of the
restore_backup function, and setting correctly the
new_volume_handler in RestoreHelper when restoring from a tarball.

However, there are still some unit tests related to multivolume
handling that still fail.

11 years agofixing bug when restoring files, mtime of parent dir was not preserved/restored correctly
Eduardo Robles Elvira [Sat, 28 Sep 2013 09:18:30 +0000]
fixing bug when restoring files, mtime of parent dir was not preserved/restored correctly

11 years agoFixing corner case where pad was not taken into account when decrypting the end of...
Eduardo Robles Elvira [Fri, 27 Sep 2013 14:06:58 +0000]
Fixing corner case where pad was not taken into account when decrypting the end of a file in a stream

__dec_read function reads directly from the file and returns the data
decrypted. This means that if the file is not encrypted, this function
is trivial.

If the data in the file is encrypted, then the process is different:
first we have to read the raw encrypted data, then decrypt it and
return. But the decryption process is not straightforward because the
self.fileobj stream contains multiple encrypted files one after the
other. We need to detect each separate file, which is detected because
they are separated by the "Salted__" keyword.

It gets more complicated, because we decrypt chunk by chunk, and to
correctly decrypt one chunk we need to set a "last" variable that
specifies if it's the last chunk of a file, because the end of a file is
handled differently, as it gets padded.

Knowing if the current chunk is the last part of a file is usually done
just by detecting if it's followed by a "Salted__" keyword or if we
cannot read more bytes from the stream. BUT there's a pretty particular
case, in which the current chunk ends exactly with one file, so that
the next chunk starts with "Salted__".

To fix that rare case, we just read N bytes from the stream, and check
if the last bytes correspond with the string "Salted__". Then we save
those last characters for next call to __dec_read. If the last bytes
were "Salted__", then we set "last" to True.

Well, actually we not only substract the length of "Salted__", but 16/32
chars because the file is decrypted in multiples of the key size.

11 years agowhen a comparison of two json paths in test_deltatar fails, show the two of them...
Eduardo Robles Elvira [Fri, 27 Sep 2013 14:06:37 +0000]
when a comparison of two json paths in test_deltatar fails, show the two of them in console, this is quite handy

11 years agoadding again all the test clases to runtests, as we were only testing default tar...
Eduardo Robles Elvira [Fri, 27 Sep 2013 14:05:16 +0000]
adding again all the test clases to runtests, as we were only testing default tar mode

11 years agoimproving the filesplitter, allowing to split at specified offsets. this is useful...
Eduardo Robles Elvira [Fri, 27 Sep 2013 14:04:28 +0000]
improving the filesplitter, allowing to split at specified offsets. this is useful for debugging or to use as a last resort technique to recover a backup, knowing the offsets from the index for example

11 years agoadding more options to backup script, like listing backup files
Eduardo Robles Elvira [Fri, 27 Sep 2013 14:02:51 +0000]
adding more options to backup script, like listing backup files

11 years agofixing some restore problems
Eduardo Robles Elvira [Fri, 20 Sep 2013 08:14:03 +0000]
fixing some restore problems

* files that are not in the index being restored are now removed

* directories' mtime was not being restored sometimes because it
  wasn't finding the tarobj

11 years agofixing sorting and improving dramatically restore diff backup:
Eduardo Robles Elvira [Thu, 19 Sep 2013 15:37:40 +0000]
fixing sorting and improving dramatically restore diff backup:

* sorting was not correct because the directory separator was being taken
  into account as part of the sorting, and thus if a directory contained
  a character like '-' it would affect sorting when compared with '/'.
  Now we sort directory by directory in a path, so the dir separator is
  not sorted itself.

* diffs backups where very slow because we were using a very simple
  algorithm that was also very slow, were for each file we would reopen
  and go across the index until found. Now we go across the index only
  once in the whole restore operation, so the speed of restoring a
  backup has increased dramatically.

11 years agosmall documentation fix, improving jsonpath comparator for directories, as their...
Eduardo Robles Elvira [Wed, 18 Sep 2013 13:00:20 +0000]
small documentation fix, improving jsonpath comparator for directories, as their size dont matter, and improving it also to not compare uid or gid if not superuser

11 years agoadd handy backup command, used for benchmarks
Eduardo Robles Elvira [Tue, 17 Sep 2013 09:46:49 +0000]
add handy backup command, used for benchmarks

11 years agofixing bug related to deltatar multivol restore
Eduardo Robles Elvira [Mon, 16 Sep 2013 16:26:50 +0000]
fixing bug related to deltatar multivol restore

Extracting a multivol diff backup sometimes failed because we did
not set the volume number, which is needed to be done when we are
extracting files one by one.

11 years agofixing multiple errors in deltatar at once:
Eduardo Robles Elvira [Sat, 14 Sep 2013 06:42:49 +0000]
fixing multiple errors in deltatar at once:

* naming of the generated backups was incorrect because they were
always named as if they were full backups, even if it was a diff
one. This has been changed both at backup creation and at backup
finding.

Related to that is the backup volume "finder": it was trying to
find volumes with current date which is not what we want, so now
it guesses the date of the volume based on a prefix and a suffix
inside the backup directory.

* changing the ordering of the files in _recursive_walk_dir to
follow an ascending naming sorted Breadth First Search algorithm.
This has been fixed without having to retrieve the full list and
then apply a sort to be efficient, which was something Daniel
applied as a fix and got reverted for memory efficiency.

* fixing index iterator also removing the need to have the full
index in memory and allowing it to be used with the "with"
python statement.

* fixing collate_iterators sorting because when the second index
element was less than the first one, we were not taking into
account that in a BFS algorithm files nearer to the root in depth
go first regardless of the sorting.

* some optimizations and fixes related to the deletion of files
in restore_backup for diff backups have been done

11 years agoFixed multivolume with encryption creation
Daniel Garcia Moreno [Sun, 1 Sep 2013 10:54:15 +0000]
Fixed multivolume with encryption creation

Adding the test test_restore_from_index_diff_backup3_multivol I've found a
bug in the multivolume creation with encryption. The problem was that the
first volume of data was created correctly, but the second and so were
created in plain text.

The problem was in the TarFile.open_volume method, just in the creation of
the new volume file, the encryption data was not passed to the new _Stream
object.

11 years agoFixed aes deltatar restoring
Daniel Garcia Moreno [Sun, 1 Sep 2013 08:03:10 +0000]
Fixed aes deltatar restoring

Test DeltaTarGzipAes256ConcatTest.test_restore_from_index_diff_backup3 was
failing and this patch fixed it.

The encryption was initialized on every call to _init_read_gz and every
time we found a new encryption chunk (something that starts with
"Salted__"). The correct way to do it is to initialize at the beginning and
every time we find a new encryption chunk, it's not needed to initialize
the encryption on every call to _init_read_gz.

There was an exception trying to decompress a chunk of data in the line:

buf = self.cmp.decompress(buf)

This happened because at the end of the file the call to _init_read_gz
fails and the exception is controlled by a try-except, but sometimes just
after this fail there is a call to read the trailing data with the gzip and
a try to decompress and it fails because the self.cmp is not initialized,
this data is garbage, so I catch this exception and everything works okay.

11 years agoFixed DeltaTar create_diff_backup and restore_backup
Daniel Garcia Moreno [Thu, 29 Aug 2013 12:00:20 +0000]
Fixed DeltaTar create_diff_backup and restore_backup

11 years agoStart all tests in the same directory
Daniel Garcia Moreno [Fri, 23 Aug 2013 16:35:51 +0000]
Start all tests in the same directory

11 years agoFixed test_create_diff_backup1
Daniel Garcia Moreno [Fri, 23 Aug 2013 16:21:19 +0000]
Fixed test_create_diff_backup1

11 years agofixing again tarfile.readline..
Eduardo Robles Elvira [Sun, 11 Aug 2013 17:37:04 +0000]
fixing again tarfile.readline..

11 years agoadding unit test that uses .git to create and restore backups
Eduardo Robles Elvira [Sat, 10 Aug 2013 08:58:09 +0000]
adding unit test that uses .git to create and restore backups

11 years agofixing readlin in tarfile, it was not working right after passing the bufsize
Eduardo Robles Elvira [Sat, 10 Aug 2013 08:46:04 +0000]
fixing readlin in tarfile, it was not working right after passing the bufsize

11 years agoremoving typo error
Eduardo Robles Elvira [Fri, 9 Aug 2013 13:28:40 +0000]
removing typo error

11 years agoadding support for compressed index files
Eduardo Robles Elvira [Fri, 9 Aug 2013 10:08:48 +0000]
adding support for compressed index files

11 years agodeltatar: setting and checking mtime and ctime in dirs and files
Eduardo Robles Elvira [Thu, 8 Aug 2013 08:55:10 +0000]
deltatar: setting and checking mtime and ctime in dirs and files

11 years agofixing bug in diff engine making it fail when a directory is removed
Eduardo Robles Elvira [Thu, 8 Aug 2013 08:07:35 +0000]
fixing bug in diff engine making it fail when a directory is removed

11 years agoadding some unit tests for restoring diff backups and fixing some bugs in there
Eduardo Robles Elvira [Wed, 7 Aug 2013 14:42:46 +0000]
adding some unit tests for restoring diff backups and fixing some bugs in there

11 years agodeltatar: initial implementation of the diff restore engine
Eduardo Robles Elvira [Tue, 6 Aug 2013 12:41:35 +0000]
deltatar: initial implementation of the diff restore engine

11 years agoimproving diff engine unit test so that it test deletion of files
Eduardo Robles Elvira [Tue, 6 Aug 2013 07:49:35 +0000]
improving diff engine unit test so that it test deletion of files

11 years agodeltatar: fixing some problems with diff engine and adding more unit tests
Eduardo Robles Elvira [Tue, 6 Aug 2013 07:44:16 +0000]
deltatar: fixing some problems with diff engine and adding more unit tests

11 years agoimproving the empty diff backup unit test
Eduardo Robles Elvira [Mon, 5 Aug 2013 16:38:07 +0000]
improving the empty diff backup unit test

11 years agodeltatar: standarizing using a prefix for all kind of file paths in all types of...
Eduardo Robles Elvira [Mon, 5 Aug 2013 13:39:48 +0000]
deltatar: standarizing using a prefix for all kind of file paths in all types of backups

11 years agoinitial implementation of diff backup and a simple unit test
Eduardo Robles Elvira [Mon, 5 Aug 2013 11:59:49 +0000]
initial implementation of diff backup and a simple unit test

11 years agowriting iterators for directory diffs and unit testing them
Eduardo Robles Elvira [Sun, 4 Aug 2013 10:37:46 +0000]
writing iterators for directory diffs and unit testing them

11 years agodeltatar: adding parent path checking, and unit tests for it
Eduardo Robles Elvira [Fri, 2 Aug 2013 15:26:59 +0000]
deltatar: adding parent path checking, and unit tests for it

11 years agotesting deltatar filtering regular expressions
Eduardo Robles Elvira [Fri, 2 Aug 2013 08:18:19 +0000]
testing deltatar filtering regular expressions

11 years agoallow also filtering on the extraction of backup tar files
Eduardo Robles Elvira [Thu, 1 Aug 2013 14:55:58 +0000]
allow also filtering on the extraction of backup tar files

11 years agodeltatar: limit restore from index tests to uncompressed or concat compressed modes
Eduardo Robles Elvira [Thu, 1 Aug 2013 14:25:45 +0000]
deltatar: limit restore from index tests to uncompressed or concat compressed modes

11 years agodeltatar: adding support for filtering in restore index and adding unit tests
Eduardo Robles Elvira [Thu, 1 Aug 2013 09:35:41 +0000]
deltatar: adding support for filtering in restore index and adding unit tests

11 years agoFixing AESCrypt stupid bug
Daniel Garcia Moreno [Thu, 1 Aug 2013 08:58:23 +0000]
Fixing AESCrypt stupid bug

11 years agoadding unit tests for filter function
Eduardo Robles Elvira [Thu, 1 Aug 2013 08:55:44 +0000]
adding unit tests for filter function

11 years agofirst implementation of filtered restore_backup and unit test
Eduardo Robles Elvira [Thu, 1 Aug 2013 08:17:04 +0000]
first implementation of filtered restore_backup and unit test

11 years agoimplementing filter_func in deltatar
Eduardo Robles Elvira [Wed, 31 Jul 2013 15:58:28 +0000]
implementing filter_func in deltatar

11 years agoRemoving OFB pad to avoid to hide errors
Daniel Garcia Moreno [Wed, 31 Jul 2013 12:07:18 +0000]
Removing OFB pad to avoid to hide errors

11 years agofixing bug extracting tarfiles from index offsets when using multivol
Eduardo Robles Elvira [Wed, 31 Jul 2013 10:05:54 +0000]
fixing bug extracting tarfiles from index offsets when using multivol

11 years agorestore from index without multiple vols now works
Eduardo Robles Elvira [Tue, 30 Jul 2013 15:17:22 +0000]
restore from index without multiple vols now works

11 years agoadding initial support to restore from index. still failing in directories
Eduardo Robles Elvira [Tue, 30 Jul 2013 10:23:25 +0000]
adding initial support to restore from index. still failing in directories

11 years agotarfile: adding a way to know the starting position of last tar member added
Eduardo Robles Elvira [Tue, 30 Jul 2013 09:19:26 +0000]
tarfile: adding a way to know the starting position of last tar member added

11 years agoupdated the estimation
Eduardo Robles Elvira [Tue, 30 Jul 2013 09:06:44 +0000]
updated the estimation

11 years agofixing and unit testing multivolume support
Eduardo Robles Elvira [Sun, 28 Jul 2013 08:44:10 +0000]
fixing and unit testing multivolume support

11 years agodeltatar: removing not bz2 concat stream test, adding crc checking and unit test...
Eduardo Robles Elvira [Sat, 27 Jul 2013 08:47:05 +0000]
deltatar: removing not bz2 concat stream test, adding crc checking and unit test for it

11 years agoadding a test class for each supported mode and fixing some related bugs
Eduardo Robles Elvira [Sat, 27 Jul 2013 08:17:15 +0000]
adding a test class for each supported mode and fixing some related bugs

11 years agodeltatar: now index file is created on create_full_backup calls
Eduardo Robles Elvira [Fri, 26 Jul 2013 17:44:43 +0000]
deltatar: now index file is created on create_full_backup calls

11 years agoinitial super simple implementation and unit test of restore_backup
Eduardo Robles Elvira [Fri, 26 Jul 2013 17:10:44 +0000]
initial super simple implementation and unit test of restore_backup

11 years agoinitial basic implementation of the create_full_backup and very basic unit test
Eduardo Robles Elvira [Fri, 26 Jul 2013 16:26:06 +0000]
initial basic implementation of the create_full_backup and very basic unit test

11 years agoadding steps to the design
Eduardo Robles Elvira [Fri, 26 Jul 2013 16:25:22 +0000]
adding steps to the design

11 years agospecifing max vol size in mb and only for backup creation
Eduardo Robles Elvira [Thu, 25 Jul 2013 15:52:50 +0000]
specifing max vol size in mb and only for backup creation

11 years agofixing minor typos in DeltaTar spec
Eduardo Robles Elvira [Thu, 25 Jul 2013 15:48:08 +0000]
fixing minor typos in DeltaTar spec

11 years agoFix small typo
Thomas Jarosch [Wed, 24 Jul 2013 16:09:25 +0000]
Fix small typo

11 years agoimproving design of the tool after thomas input
Eduardo Robles Elvira [Wed, 24 Jul 2013 15:53:25 +0000]
improving design of the tool after thomas input

11 years agofixing some minor details
Eduardo Robles Elvira [Wed, 24 Jul 2013 07:54:42 +0000]
fixing some minor details

11 years agoimproving the design of DeltaTar public API, making it more flexible
Eduardo Robles Elvira [Wed, 24 Jul 2013 07:53:00 +0000]
improving the design of DeltaTar public API, making it more flexible

11 years agouploading proposed public API
Eduardo Robles Elvira [Mon, 22 Jul 2013 08:03:10 +0000]
uploading proposed public API

11 years agoAdd note about file index compression/encryption
Thomas Jarosch [Fri, 19 Jul 2013 09:10:05 +0000]
Add note about file index compression/encryption

11 years agospecifying key_length in bits instead of bytes
Eduardo Robles Elvira [Fri, 19 Jul 2013 07:48:30 +0000]
specifying key_length in bits instead of bytes

11 years agoSupporing aes128 and aes256 encryption type
Daniel Garcia Moreno [Thu, 18 Jul 2013 18:12:47 +0000]
Supporing aes128 and aes256 encryption type

11 years agoChanged the gpl header to lgpl
Daniel Garcia Moreno [Thu, 18 Jul 2013 17:51:22 +0000]
Changed the gpl header to lgpl

11 years agoFixed encryption pad treatment using random pad
Daniel Garcia Moreno [Tue, 16 Jul 2013 08:26:36 +0000]
Fixed encryption pad treatment using random pad

11 years agoFixed filesplit corner case infinite loop
Daniel Garcia Moreno [Tue, 16 Jul 2013 08:24:59 +0000]
Fixed filesplit corner case infinite loop

11 years agoAdded encrypt/decrypt multivolume test
Daniel Garcia Moreno [Tue, 16 Jul 2013 06:21:29 +0000]
Added encrypt/decrypt multivolume test

11 years agoAdding intra2net copyright header to every python file
Daniel Garcia Moreno [Mon, 15 Jul 2013 15:44:45 +0000]
Adding intra2net copyright header to every python file

11 years agoUsing aes128 for encryption
Daniel Garcia Moreno [Mon, 15 Jul 2013 15:42:09 +0000]
Using aes128 for encryption