duplicati三, 23/11/2022 - 14:51 的修訂版本

修訂版本可以讓你追蹤文章的多個版本的不同之處。

最後更新: 2022-11-23

介紹

這裡講的是 Duplicati 2

License: LGPL

功能

 * Type: incremental backups and data deduplication
 * Storage format: block-based
 * UI: web-based interface or via command line interface
 * Scheduler: built-in scheduler
 * Many Backends (LocalDisk, FTP, SSH ... S3, Dropbox, Google Cloud Storage, OneDrive)
 * OS: Windows(.NET 4.7.1, vs2015 run-time), Linux(Mono)

 * Compression
    All backup data is compressed before it is encrypted and uploaded.
    Duplicati detects files that are compressed already and
    adds those as they are to the Zip or 7z archives. (mp3, jpeg or mkv)

 * Strong encryption(AES-256)

 * Deduplication(block-based)

 * Online backup verification

Components

  • Tray Icon (8200/tcp)
  • Command Line tools
  • Service

Tray Icon(Duplicati.GUI.TrayIcon.exe)

The server component is included in the Tray Icon tool
(It perform tasks in the background - Scheduler)

Server component(Duplicati.Server.exe)

The server component is completely included in Duplicati.GUI.TrayIcon.exe
(unless disabled with the --no-hosted-server command line option.)

Command Line tools(Duplicati.CommandLine.exe)

Duplicati can make backups without loading the server component
(Windows Task Scheduler (Windows) or Cron (Linux))

Service(Duplicati.WindowsService.exe)

A small agent starts the server component and pings the server to verify it is running

目錄

  • To register Duplicati Server as a Windows service
  • Advanced Settings
  • CLI - Duplicati.CommandLine.exe
  • Other .exe
  • Restoring files if your Duplicati installation is lost

 

 


To register Duplicati Server as a Windows service

 

Services are started by default with the Local System account(SYSTEM )

Configuring the Duplicati Tray Icon in Windows

1) C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
2) properties of the Duplicati 2 shortcut
3) "...Duplicati.GUI.TrayIcon.exe" --no-hosted-server

Install service
4) administrator cmd.exe
5) cd C:\Program Files\Duplicati 2
6) Duplicati.WindowsService.exe install        # uninstall
7) sc start Duplicati

更改 DB 位置

* that location may be lost when upgrading Windows.

mkdir c:\Duplicati_DB\log

Duplicati.WindowsService.exe install ^
--server-datafolder=c:\Duplicati_DB --ping-pong-keepalive ^
--log-file=c:\Duplicati_DB\log\log.txt --log-level=Information --log-retention=1D

--ping-pong-keepalive

When running as a server, the service daemon must verify that the process is responding.
If this option is enabled, the server reads stdin and writes a reply to each line read.

 

使用 Service 後的 TrayIcon

# 在無 pw 情況下先開到
Duplicati.GUI.TrayIcon.exe --no-hosted-server ^
--hosturl=http://localhost:8200

# 在有 pw 情況, 只可在 DB 讀 PW
Duplicati.GUI.TrayIcon.exe --no-hosted-server ^
--read-config-from-db --server-datafolder=C:\Duplicati_DB

P.S.

  • TrayIcon 執行方式的 DB: C:\Users\tim\AppData\Local\Duplicati
  • Service 方式: C:\Windows\System32\config\systemprofile\AppData\Local\Duplicati

 


Advanced Settings

 

重要設定

--snapshot-policy = off

If this is set to off, Duplicati will not attempt to create a disk snapshot. (Default)
Setting this to auto makes Duplicati attempt to create a snapshot, and fail silently if that was not allowed or supported.
"required" will make Duplicati abort the backup if the snapshot creation fails.
On Windows this uses the Volume Shadow Copy Services (VSS) and requires administrative privileges.
On Linux this uses Logical Volume Management (LVM) and requires root privileges.

verification

--upload-verification-file=false

Upload a verification file(duplicati-verification.json) after changing the remote storage.
contains the size and SHA256 hashes of all the remote files and
can be used to verify the integrity of the files.

--backup-test-percentage=0

After a backup is completed, some (dblock, dindex, dlist) files from the remote backend are selected for verification.

--full-remote-verification=false

MISC.

--no-auto-compact=false

If a large number of small files are detected during a backup,
or wasted space is found after deleting backups, the remote data will be compacted.
The compacting procedure is triggered after each backup

Restore 時用到

--version=STRING

By default, Duplicati will list and restore files from the most recent backup,
use this option to select another item. (e.g. 0,2-4,7)

--full-block-verification=false

Use this option to increase verification by checking the hash of blocks read from a volume
before patching restored files with the data.

 


CLI - Duplicati.CommandLine.exe

 

You can perform all operations that are available in the Graphical User Interface.

 


Other .exe

 

Duplicati.CommandLine.BackendTester.exe

 

Duplicati.Library.Snapshots.exe

to test if snapshots can be created successfully and if they can be used to access open files.

Duplicati.CommandLine.RecoveryTool.exe

This tool can be used in very specific situations, where you have to restore data from a corrupted backup.

Duplicati.CommandLine.ConfigurationImporter.exe

import backup configurations from the command-line

i.e.

ConfigurationImporter.exe C:\backup-config.json ^
--import-metadata=false ^
--server-datafolder=<absolute path to folder that contains Duplicati-server.sqlite>

 


Restoring files if your Duplicati installation is lost

 

A) import config (JSON ) # contain sensitive information

B) you need to know the backend URL, credentials and the backup passphrase

Before deleting a backup job, it is recommended to export the backup job settings to a file.

If you really want to delete the backup files also, click to select Delete remote files.