Commit Graph
89 Commits
Author SHA1 Message Date
kenneth@hexad.dk ca53afe000 Merged r1464 and r1465 into trunk
git-svn-id: https://duplicati.googlecode.com/svn/trunk@1466 59da171f-624f-0410-aa54-27559c288bec
2012-10-08 18:48:36 +00:00
kenneth@hexad.dk a4bbe8db1d Added some comments to the main file processing loop
git-svn-id: https://duplicati.googlecode.com/svn/trunk@1443 59da171f-624f-0410-aa54-27559c288bec
2012-08-23 07:15:15 +00:00
kenneth@hexad.dk 806f9fcad5 Fixed a bug introduced with r1437 that could cause backups to generate infinite set of empty volumes.
git-svn-id: https://duplicati.googlecode.com/svn/trunk@1441 59da171f-624f-0410-aa54-27559c288bec
2012-08-23 07:07:52 +00:00
kenneth@hexad.dk fa97957296 Fixed a bug introduced with r1381 that could cause incomplete backups.
git-svn-id: https://duplicati.googlecode.com/svn/trunk@1437 59da171f-624f-0410-aa54-27559c288bec
2012-08-22 09:49:11 +00:00
kenneth@hexad.dk 48ab8e31f4 Added reporting of symlinks.
git-svn-id: https://duplicati.googlecode.com/svn/trunk@1422 59da171f-624f-0410-aa54-27559c288bec
2012-08-07 20:14:20 +00:00
kenneth@hexad.dk 8f3d2b961f Added reporting of symlinks.
git-svn-id: https://duplicati.googlecode.com/svn/trunk@1421 59da171f-624f-0410-aa54-27559c288bec
2012-08-07 20:12:12 +00:00
kenneth@hexad.dk 65c320c22d Rewrite of the way the compression modules are used.
The number of methods required by the ICompression interface is now reduce and all handling of path conversion and text encoding is now done in the CompressionWrapper class. This should make it easier to implement a new compression module, and reduce the number of errors that occur because of filename/encoding issues.

This commit also contains a fix for reporting a sane error message if the compression module is not found/loaded.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@1417 59da171f-624f-0410-aa54-27559c288bec
2012-08-07 17:42:09 +00:00
kenneth@hexad.dk b277f6325d Fairly large rewrite of how files and paths are handled.
This fixes issues #144, #577 and #320.

This update introduces a new options called "symlink-policy" that can be set to "store", "ignore" or "follow".
The default setting "store" means all symlinks are recorded as symlinks and recreated as symlinks on restore. This is chosen as default because it is the best replication of the actual disk contents.
Setting it to "ignore" simply means that no information is recorded about any symlinks.
And lastly, setting it to "follow" reverts to the previous default of treating symlinks as if they are normal files/folders.
Caveat: On Windows, you need Administrator privileges to create symlinks (when restoring), but not for reading them (on backup).

Since this change meant that the file attributes must be read, I also added support for the option "exclude-files-attributes", that can be used to ignore/exclude files with certain attributes, such as "hidden", "archive" or "encrypted".

Since I had to much about so much with getting the symlinks supported on Windows, I also added some extra logic to the Windows file handler, so it can now handle files and folders with up to 32k chars in the path. The logic is done so that the normal System.IO operations are used for paths with less than 260 characters (MAX_PATH), and on error or longer paths, the Win32 Unicode API is invoked. This should give maximal backwards compatibility and still allow backup and restore of files with long paths.

This commit also includes a BlockingQueue implementation that is supposed to make file/folder enumeration faster, but this has not been implemented because Duplicati depends on having a "whole world" view of the files and folders before running the backup (i.e. deeper changes required for this).


git-svn-id: https://duplicati.googlecode.com/svn/trunk@1381 59da171f-624f-0410-aa54-27559c288bec
2012-07-29 20:07:10 +00:00
kenneth@hexad.dk d3bc855521 Merged r1339 into trunk
git-svn-id: https://duplicati.googlecode.com/svn/trunk@1340 59da171f-624f-0410-aa54-27559c288bec
2012-06-26 14:19:45 +00:00
kenneth@hexad.dk d6b77fb461 Merged r1295 and r1296 into trunk
git-svn-id: https://duplicati.googlecode.com/svn/trunk@1297 59da171f-624f-0410-aa54-27559c288bec
2012-05-17 08:07:41 +00:00
kenneth@hexad.dk b7a99e1659 Moved the date/time EPOCH value to the utility library
git-svn-id: https://duplicati.googlecode.com/svn/trunk@1281 59da171f-624f-0410-aa54-27559c288bec
2012-05-14 20:49:41 +00:00
kenneth@hexad.dk 203778b911 Added metadata recording, for later use in the new UI.
git-svn-id: https://duplicati.googlecode.com/svn/trunk@1274 59da171f-624f-0410-aa54-27559c288bec
2012-05-14 18:48:21 +00:00
kenneth@hexad.dk e0868ff9e5 Fixed a problem where a file could be left open if the backup was stopped.
Update issue #296

I found and fixed a situation where a single file could be left open if the backup was stopped/aborted.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@1173 59da171f-624f-0410-aa54-27559c288bec
2012-03-20 20:22:43 +00:00
kenneth.skovhede@gmail.com 87ad255acc Update issue #204
Status: Fixed

Duplicati now defaults to not upload a backup if nothing has changed.
This is indicated by a light-green check mark in the status window.
The option --upload-unchanged-backups can be set to revert to the previous way of working.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@958 59da171f-624f-0410-aa54-27559c288bec
2011-10-30 14:31:46 +00:00
kenneth.skovhede@gmail.com 003d6362f7 Update issue #482
Status: Fixed

Found and fixed a "slash vs. backslash" problem with files that span multiple volumes.
This will be included in the next preview release.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@950 59da171f-624f-0410-aa54-27559c288bec
2011-10-28 05:43:15 +00:00
kenneth.skovhede@gmail.com a401357291 Update issue #419
The code should now "gracefully" handle missing timestamps.
For files with no modification time, they are assigned 1. jan. 1970 00:00:00 (EPOCH).
This has the drawback that files are read fully because we cannot rely on the modification timestamp, so it may be a bit slower.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@802 59da171f-624f-0410-aa54-27559c288bec
2011-06-16 16:18:05 +00:00
kenneth.skovhede@gmail.com b0a359fd27 Updated license text
git-svn-id: https://duplicati.googlecode.com/svn/trunk@770 59da171f-624f-0410-aa54-27559c288bec
2011-05-09 19:52:28 +00:00
kenneth.skovhede@gmail.com 4d4084ddb9 Update issue #399
Status: Fixed

The folder list is now case-insensitive on Windows,
so the problem no longer arises.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@750 59da171f-624f-0410-aa54-27559c288bec
2011-04-10 15:01:17 +00:00
kenneth.skovhede@gmail.com b834dab602 This commit upgrades the manifest version number to 3.
This commit includes an option to create an unencrypted verification file.
There is now a check to see if all volumes mentioned in the manifest exists,
before performing backup/restore operations.
This check is also performed on cleanup.
There is now a check that prevents auto-cleanup from removing more than
2 orphan files. 

If a delete-older-than or delete-all-but-n-full is interrupted, the leftover
files will not be auto-deleted but must be deleted with the cleanup command,
which allows the user to see what files are delete.

Update issue #360
Status: Fixed

There is now a complete verification chain, where the manifest hashes are verified backwards.


git-svn-id: https://duplicati.googlecode.com/svn/trunk@711 59da171f-624f-0410-aa54-27559c288bec
2011-03-10 18:26:38 +00:00
kenneth.skovhede@gmail.com a7a7c39438 Fixed an issue with the progress text not showing the current action
git-svn-id: https://duplicati.googlecode.com/svn/trunk@695 59da171f-624f-0410-aa54-27559c288bec
2011-02-15 19:12:32 +00:00
kenneth.skovhede@gmail.com c787036001 Update issue #362
Status: Fixed
I found and fixed the issue, I was using an int instead of a long for the filesize,
which caused it to truncate.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@683 59da171f-624f-0410-aa54-27559c288bec
2011-02-06 12:50:59 +00:00
kenneth.skovhede@gmail.com 23d42e24e4 Added code to pre-size the memory streams to avoid repeated reallocation and memory copy.
git-svn-id: https://duplicati.googlecode.com/svn/trunk@671 59da171f-624f-0410-aa54-27559c288bec
2011-01-12 19:05:33 +00:00
kenneth.skovhede@gmail.com 2ff78dbcde Disabled usn-diff as there is a serious error with that.
See issue #332 for details, and this discussion:
http://groups.google.com/group/duplicati/browse_thread/thread/e70807dcac052187

git-svn-id: https://duplicati.googlecode.com/svn/trunk@646 59da171f-624f-0410-aa54-27559c288bec
2010-12-28 12:01:53 +00:00
kenneth.skovhede@gmail.com d024f621bf Fixed a potential problem that could occur if a folder is deleted after the file-list is generated.
git-svn-id: https://duplicati.googlecode.com/svn/trunk@645 59da171f-624f-0410-aa54-27559c288bec
2010-12-27 16:33:26 +00:00
kenneth.skovhede@gmail.com 2375b8711e Minor modifications based on dicussion in group:
http://groups.google.com/group/duplicati/browse_thread/thread/f355e3af32034300

* Changed the text to indicate that the sub-page contains volumesize
* Added the options "alternate-destination-marker" and "alternate-target-paths" to the file backend
* Added the option "sorted-filelist"
* Now updates the display each second when performing a backup

git-svn-id: https://duplicati.googlecode.com/svn/trunk@636 59da171f-624f-0410-aa54-27559c288bec
2010-12-15 19:08:16 +00:00
kenneth.skovhede@gmail.com 0c69798513 Fixed a copy/paste error for the USN policy
git-svn-id: https://duplicati.googlecode.com/svn/trunk@603 59da171f-624f-0410-aa54-27559c288bec
2010-11-26 16:52:53 +00:00
kenneth.skovhede@gmail.com e7dc268fad Renamed the Duplicati.Library.Core dll to Duplicati.Library.Utility as the "Core" name was misleading.
git-svn-id: https://duplicati.googlecode.com/svn/trunk@591 59da171f-624f-0410-aa54-27559c288bec
2010-11-21 11:08:15 +00:00
kenneth.skovhede@gmail.com 8581a4496b Update issue #247
Status: Fixed

The implementation is a mix of the the three mentioned methods (issue #247).
There is a commandline option called --open-file-policy, which can be set to 
"ignore", "snapshot" or "copy". 

The "ignore" setting does the same as previous version, simply exclude the file from the 
backup set.

If the setting is either "snapshot" or "copy", and the file it locked, it is opened in non-excusive read mode.
Once open, a in-memory signature file is generated. This is compared to the previous signature to detect changes,
just as the normal operation. If the file has not changed, the file is skipped as it would normally be.

If the file has changed and the policy is "snapshot", the file will be processed as normal,
but during the file read, a new signature is generated. This new signature is stored
in the signature archives. When writing the new signature, it is compared to the original signature.
If the file has changed during the backup operation, a warning is written to the output log.

If the policy was set to "copy", the modified file is copied to a temporary location,
while a new signature is generated. If the copy fails due to a file change, the file 
is omitted from the backup set. If the copy succeeds, the file is known to not have changed
during the first access and the copy, which gives some assurance that the file is not
actively being written, at the expense of a copy operation.

The default setting is "snapshot", because this is likely to work in most scenarios,
and potentially produces a broken file rather than guarantee a missing file (by "ignore").

Note that when reading an open file, there is always a chance that the file is being written,
so you may end up with a broken file in the backup. This is also true for the VSS and LVM snapshots,
except for VSS-aware applications.

The "copy" method is meant to minimize this risk, but there is no guarantee that the file is in an
acceptable state, just because it has not been written for any period.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@588 59da171f-624f-0410-aa54-27559c288bec
2010-11-20 13:57:12 +00:00
kenneth.skovhede@gmail.com dd44e684d1 Update issue #32
Status: Fixed

USN is now activated by default on windows, but requires Administrative privileges.
If it fails to activate, it is silently ignored, and normal filesystem enumeration is used.
Set --usn-policy to:
"on" to get a warning if it fails,
"required" to abort the backup if it fails
"off" to disable USN
"auto" to silently ignore a fail


git-svn-id: https://duplicati.googlecode.com/svn/trunk@584 59da171f-624f-0410-aa54-27559c288bec
2010-11-17 19:45:25 +00:00
kenneth.skovhede@gmail.com 7fcd66e569 Added a count for the number of files opened.
git-svn-id: https://duplicati.googlecode.com/svn/trunk@576 59da171f-624f-0410-aa54-27559c288bec
2010-11-04 21:37:32 +00:00
kenneth.skovhede@gmail.com d372bd6630 Added a test-program to the snapshot library.
Added the --vss-exclude-writers option.

Update issue #260
Status: Fixed
I have now added a --vss-exclude-writers commandline option.
I had another look at the other supported options, and I consider this the most important.
I made the simplest possible version, so it only supports class guids, not component names
or writer instance ids.

If you need any of the other switches or the component names, please let me know.
I would also be interested in hearing that it actually works (I get no errors, but thats no proof).

You can specify multiple writers with a semicolon: --vss-exclude-writers="{d61d61c8-d73a-4eee-8cdd-f6f9786b7124};{0bada1de-01a9-4625-8278-69e735f39dd2}"
If you need the guids, you can get them with the following command in a command prompt:
vssadmin list writers

git-svn-id: https://duplicati.googlecode.com/svn/trunk@574 59da171f-624f-0410-aa54-27559c288bec
2010-11-02 21:02:58 +00:00
kenneth.skovhede@gmail.com 7cddc6ae04 Fixed a bug with restore of multi-source backups, and some opened files that were not closed.
After a fix with source folder filters, the internal file "added_folders.txt"
contains the root folder entry, but not suffixed with a slash/backslash,
which caused an "index of of bounds" error when attempting to restore.

Update issue #295
Status: Fixed
I found 3 situations where an opened file was not closed.
Strange thing is that it should have been that way since the multivolume stuff was introduced.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@569 59da171f-624f-0410-aa54-27559c288bec
2010-10-29 20:54:12 +00:00
kenneth.skovhede@gmail.com b69935e0cc Update issue #264
Status: Fixed
Added a find-last-version command to the commandline version,
it takes the same input as a restore operation, so
use --file-to-restore to supply a list of files to search for.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@559 59da171f-624f-0410-aa54-27559c288bec
2010-10-23 13:10:54 +00:00
kenneth.skovhede@gmail.com 739fa5ad1b Optimized the use of timestamps to prevent file content checking.
git-svn-id: https://duplicati.googlecode.com/svn/trunk@556 59da171f-624f-0410-aa54-27559c288bec
2010-10-23 08:58:24 +00:00
kenneth.skovhede@gmail.com 994503ceed Duplicati now "inherits" the compression and encryption settings if not specified explicitly.
Since encryption (and compression) is detected after being encountered, the encryption module selection has been removed from the user interface when restoring.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@527 59da171f-624f-0410-aa54-27559c288bec
2010-09-30 12:39:52 +00:00
kenneth.skovhede@gmail.com f020aae238 Update issue #159
Status: Fixed
A restore now defaults to background and some filenames are also shown while restoring.
The "direct restore" option cannot run in the background as it requires the schedule to be stored in the database.
This can be fixed after version 2.0

git-svn-id: https://duplicati.googlecode.com/svn/trunk@525 59da171f-624f-0410-aa54-27559c288bec
2010-09-26 20:43:16 +00:00
kenneth.skovhede@gmail.com b81d63ea73 Fixed a bug with async uploads that caused some files to no be uploaded.
Fixed a protential race condition with warning messages and file counts (cosmetic only) when using async transfers.
Spelling correction, Seperator -> Separator.
Changed so a restore operation can also supply advanced options.
Changed the format of timestamps in filenames to follow the Duplicity convention, which removes the need for --time-separator and --use-short-filenames.
Moved the URL utility into Core, to avoid compilation errors with Monodevelop.
Reorganized the runner to better support the LiveControls on all operations rather than only for backup/restore.

Update issue #210
Status: Fixed
I have now changed the time format to follow the Duplicity naming convention.
This means that all filenames are now generated with the time set as "yyyyMMddTHHmmssZ".
This format is more portable across all platforms, and easily sortable/readable.
The drawback is that the Z indicates UTC time, so if one looks at the filenames, 
the times are not local. The motivation for this is to avoid trouble
with daylight savings time offsets.

There is full backwards compatibility as long as backups have not used more than
one character for --time-separator (only possible via commandline).
This new format means that the options --time-separator and --use-short-filenames
are now deprecated and removed from the user interface. It is possible to
access them from the advanced options page, along with the --use-old-filenames option.

If anyone needs these options for some reason, let me know, otherwise they will be removed
in a later version.



git-svn-id: https://duplicati.googlecode.com/svn/trunk@523 59da171f-624f-0410-aa54-27559c288bec
2010-09-25 12:02:14 +00:00
kenneth.skovhede@gmail.com 9b3169e33a Update issue #263
Status: Fixed
I have now added an option called --exclude-empty-folders
It excludes folders AFTER the filter has been applied, so if the folder is left empty due to the filter, the folder is not included either.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@520 59da171f-624f-0410-aa54-27559c288bec
2010-09-17 18:17:12 +00:00
kenneth.skovhede@gmail.com 04ba370246 Fixed a problem with VSS snapshots being bypassed, see issue #258
git-svn-id: https://duplicati.googlecode.com/svn/trunk@516 59da171f-624f-0410-aa54-27559c288bec
2010-09-16 16:12:55 +00:00
kenneth.skovhede@gmail.com 3e054c2576 Added a number of error correction and detection messages to prevent the volume deletion problem created by the S3 backend bug.
git-svn-id: https://duplicati.googlecode.com/svn/trunk@512 59da171f-624f-0410-aa54-27559c288bec
2010-09-12 21:50:09 +00:00
kenneth.skovhede@gmail.com 1aaf9c8f98 Added option to enable verbose error messages
git-svn-id: https://duplicati.googlecode.com/svn/trunk@508 59da171f-624f-0410-aa54-27559c288bec
2010-09-11 12:43:55 +00:00
kenneth.skovhede@gmail.com 08a58bfdbb Update issue #262
Status: Fixed

It turns out that the fix to enable filters disabled the --file-to-restore option.
I have fixed that and also updated the restore output to correctly reflect what has happened during the restore.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@505 59da171f-624f-0410-aa54-27559c288bec
2010-09-11 11:12:46 +00:00
kenneth.skovhede@gmail.com 5bc2dc3d35 Fix for building with MonoDevelop (and VS < 2008).
git-svn-id: https://duplicati.googlecode.com/svn/trunk@503 59da171f-624f-0410-aa54-27559c288bec
2010-09-09 17:18:33 +00:00
kenneth.skovhede@gmail.com 8e16d51e00 Update issue #21
Status: Fixed

The backup can now proceed with a broken signature file.
A restore operation is not affected by broken signature files either,
although the restore will include previously deleted files,
if the signatures are damaged.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@492 59da171f-624f-0410-aa54-27559c288bec
2010-09-04 12:23:03 +00:00
kenneth.skovhede@gmail.com 79fdce5ca6 Update issue #185
Status: Fixed
The code to support this was already in place, but did
not work because Application.Exit() had been invoked,
making all messageboxes return Cancel without showing.

I also improved the logic a bit so a cancel does
not invoke the cleanup afterwards, making the exit
procedure faster.

I also added checks for the stop command to the
code that fetches the signature files, to make
the application respond faster to the stop command.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@490 59da171f-624f-0410-aa54-27559c288bec
2010-09-01 21:04:18 +00:00
kenneth.skovhede@gmail.com be9afd996b Update to the last commit, fixed casing of m_folderTimestamps
git-svn-id: https://duplicati.googlecode.com/svn/trunk@485 59da171f-624f-0410-aa54-27559c288bec
2010-08-31 20:00:31 +00:00
kenneth.skovhede@gmail.com 76cac1ab86 Fixed a potential problem where the folder names where stored
in the local format (eg. using backslash). This could
create trouble if the backup was made on windows and restored
on linux.

Update issue #229
Status: Fixed

I have updated the code to store the correct time for the
files, as well as the folders. The folder timestamp
adds a slight overhead to the volumes, as Zip
archives have no folder entries, so the timestamps
for folders are kept in a separate file.

The time stored in the existing archives is the date the backup 
was made, not the last modified time, so it is not possible to 
restore the modification date for existing archives.
When restoring new archives, the correct date is set
for both files and folders.
When restoring older archives, the backup date is used
for files, and nothing is done for folders.

I also changed the internal storage to use UTC time format
for all timestamps to avoid problems with backup/restores on
machines with different timezones.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@484 59da171f-624f-0410-aa54-27559c288bec
2010-08-31 19:50:52 +00:00
kenneth.skovhede@gmail.com 92829fa393 Fixed issue #242.
Corrected a lot of avalible -> available and recieve -> receive spelling errors.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@462 59da171f-624f-0410-aa54-27559c288bec
2010-08-12 18:37:15 +00:00
kenneth.skovhede@gmail.com 51552bea24 Fixes for issue #18.
Added snapshot support using either VSS (win xp/vista/7) or LVM (linux).
Using the snapshot feature requires administrative/root privileges, and is toggled by the "snapshot-policy" option (by commandline or in advanced settings).

Also improved the validation of options to not show incorrect warnings.
This fixes issue #233.


git-svn-id: https://duplicati.googlecode.com/svn/trunk@461 59da171f-624f-0410-aa54-27559c288bec
2010-08-12 18:32:15 +00:00
kenneth.skovhede@gmail.com a40f6acf37 A fairly large refactoring of the code.
This was based on the idea that the interfaces should remain static.
I hope this change is enough to ensure stable interfaces until release 1.2.

Overview of changes:
Moved all interfaces into the same dll.
Encryption and compression is now plugable modules, just as the backends.
Encryption/compression can now register an UI.
Encryption now uses AESCrypt as a default.
GPG does not default to using the --armor option.
Added support for generic modules, but none are written yet.
Added support for plugable settings pages in the "Options" dialog.

Fixed issue #148.
Duplicati now uses AESCrypt as the default encryption format.

Fixed issue #199.
GPG now supports custom commandline options.

Fixed issue #207.
Encryption modules are now plugable.

Fixed issue #118.
S3 credentials are now stored.

Fixed issue #151.
Backends can now register system wide options.


git-svn-id: https://duplicati.googlecode.com/svn/trunk@427 59da171f-624f-0410-aa54-27559c288bec
2010-06-19 21:08:21 +00:00