Outils pour utilisateurs

Outils du site


issue201:tutoriel1

Ceci est une ancienne révision du document !


My main backup process involves making full disk images, usually on a monthly basis, as the operating system and the installed applications don’t change much over any shorter term. My preferred software for disk imaging is Rescuezilla (see: Rescuezilla For Backups; Full Circle Magazine; No. 190; pp. 21-22); however, this package has one distinct downside. The developers have yet to produce a functional method for mounting an image and browsing the included files and folders in order to retrieve specific items. This facility is available for uncompressed images but not for images produced using gzip, which I use in order to be able to store multiple backups in a reasonable amount of disk space.

The issue is really only limited to my personal data files which are stored in a dedicated data partition on the main hard drive. If I wish to restore an old version of a file, it just isn’t convenient to have to restore an entire disk image onto an external USB drive and then extract the required file from the resultant copies. In addition, monthly backups are too infrequent for data files that are created or modified on a daily or weekly basis.

What I need is software to make frequent backups of the files and folders on my data drive with the option to retrieve any past version of a specific file or folder. There are a number of ways to achieve this, but many solutions involve scripting and command-line operations. My preference is to have software with an easy-to-use graphical interface, and the package that fits the bill is named Duplicati.

Duplicati is an open-source, cross-platform (Linux, Windows, Mac/OSX), backup program developed by Kenneth Skovhede, a computer science professor at the Niels Bohr Institute, University of Copenhagen. While it was originally developed to store encrypted data in the cloud, it functions equally well as a general-purpose backup solution using local disk drives.

In particular, the program can be used to create incremental backups of a specified data source to a pre-defined target drive. Backups can be run according to a defined schedule or can be run manually on demand. The program has a web-style user interface, running in the default browser through a localhost server. It is very easy to use as it features wizards to build the backup configuration and the restore function.

The wizard to add a backup requires a name to be entered for the backup and, optionally, a description of the nature of the backed-up files. By default, the backup process employs 256-bit AES encryption; however, this can be turned off if encryption is not required. On the subsequent screen, a wide variety of backup destinations is available, including cloud storage servers such as Dropbox, Google Drive, and Microsoft OneDrive, in addition to local folders or drives. As indicated for my purposes I opted to use a folder on an external USB drive as the backup target.

The location for the source data is similarly configurable, allowing selection of multiple drives, files and folders, with options to exclude hidden, system, or temporary files, or files larger than a specific size. There is also the ability to filter out specific files and folders based on a range of parameters, such as “names contain” or specified regular expressions. Backups can be scheduled for any time of day, with timed repeats (e.g. every hour), on any days of the week. If any backup is missed, the job will run as soon as possible thereafter. The automatic backup process can also be disabled, leaving it to the user to run a backup process manually.

An interesting feature of Duplicati’s backup system is that it stores blocks of data in multiple zip files that it refers to as volumes. There are three types of files produced with the extensions: .dblock.zip, for the actual blocks of data, and .dlist.zip and .dindex.zip, which track the block contents for subsequent restoration. Building the backup configuration allows the size of the stored volumes to be specified. The default value is 50 MB, chosen to avoid timeouts when uploading to a remote file server. Since this is not a consideration for local disk storage, I opted to increase the volume size to 1 GB which resulted in a total of 15 files for approximately 6 GB of data. Interestingly, the data compression factor is not very high as the 15 files occupied almost 5 GB of disk space.

The final configuration option is the selection of the retention period for the backup files. By default, this is set to keep all backups. Other options include deleting backups that are older than a specified time period, retaining a specific number of backups, or “smart backup retention”. The latter option retains one backup for each of the last seven days, each of the last four weeks, and each of the last twelve months, with there always being at least one remaining backup.

I didn’t set a backup schedule as my preference is to run the backup manually. Having completed the configuration and now back on the home screen, Duplicati tells me that the Last successful backup for my newly-created job was Never. So, to start the backup, I click on the Run now link.

The first time the program runs it creates a full backup of the source files and folders. Subsequent runs produce incremental backups and so the process runs much faster, and the additional storage space required is considerably reduced.

As noted earlier, a second wizard is provided when restoring data from a backup. Firstly, a backup is identified using either the name of the backup or its storage location, and the specific date of interest (in the case of multiple incremental backups). Next, we browse through the directory tree to tag the files and folders to be restored. Options for the restored files are to place them back in the original location or to select a new location. Existing files can be overwritten, or new files can be created with time stamps in the file names. Duplicati handles the process of identifying, locating, retrieving, and storing the files recovered from the backup zip files without any further user interaction.

I came across a strange (to me) occurrence when testing the restore process. I was getting a warning that Restore completed without errors but no files were restored. Checking on Duplicati’s user forum I found that no action is taken to restore a file if the backup version is identical to that in the location where the file is to be restored. So, rather than giving this specific explanation, the program issues the rather generic warning message.

Duplicati is simple to use, flexible, and highly effective. In particular, the incremental backup process is very efficient in terms of both time and disk space required. And, additional features, such as strong encryption of the backup files, are available should these be required. Best of all, Duplicati is free (donations welcome), multi-platform, and open source. So, if you are in need of a backup solution, this software package is definitely worth a look.

https://www.duplicati.com

issue201/tutoriel1.1706373005.txt.gz · Dernière modification : 2024/01/27 17:30 de auntiee