# duplicity - pydoc - phpman

> **TLDR:** Create incremental, compressed, encrypted, and versioned backups.
>
- Backup a directory via FTPS to a remote machine, encrypting it with a password:
  `FTP_PASSWORD={{ftp_login_password}} PASSPHRASE={{encryption_password}} duplicity {{path/to/source_directory}} {{ftps://user@hostname/path/to/target_directory}}/`
- Backup a directory to Amazon S3, doing a full backup every month:
  `duplicity --full-if-older-than {{1M}} s3://{{bucket_name[/prefix}}`
- Delete versions older than 1 year from a backup stored on a WebDAV share:
  `FTP_PASSWORD={{webdav_login_password}} duplicity remove-older-than {{1Y}} --force {{webdav[s]://user@hostname[:port]/some_directory}}`
- List the available backups:
  `duplicity collection-status "file://{{absolute/path/to/backup_directory}}"`
- List the files in a backup stored on a remote machine, via SSH:
  `duplicity list-current-files {{-t|--time}} {{YYYY-MM-DD}} scp://{{user@hostname}}/{{path/to/backup_directory}}`
- Restore a subdirectory from a GnuPG-encrypted local backup to a given location:
  `PASSPHRASE={{gpg_key_password}} duplicity restore --encrypt-key {{gpg_key_id}} --path-to-restore {{path/to/restore_directory}} file://{{absolute/path/to/backup_directory}} {{path/to/directory_to_restore_to}}`

*Source: tldr-pages*

---

Help on package duplicity:

## NAME
    duplicity

## DESCRIPTION
    # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4; encoding:utf8 -*-
    #
    # Copyright 2002 Ben Escoto <<ben@emerose.org>>
    # Copyright 2007 Kenneth Loafman <<kenneth@loafman.com>>
    #
    # This file is part of duplicity.
    #
    # Duplicity is free software; you can redistribute it and/or modify it
    # under the terms of the GNU General Public License as published by the
    # Free Software Foundation; either version 2 of the License, or (at your
    # option) any later version.
    #
    # Duplicity is distributed in the hope that it will be useful, but
    # WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    # General Public License for more details.
    #
    # You should have received a copy of the GNU General Public License
    # along with duplicity; if not, write to the Free Software Foundation,
    # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

## PACKAGE CONTENTS
    _librsync
    asyncscheduler
    backend
    backends (package)
    cached_ops
    commandline
    config
    diffdir
    dup_collections
    dup_main
    dup_temp
    dup_threading
    dup_time
    errors
    file_naming
    filechunkio
    globmatch
    gpg
    gpginterface
    lazy
    librsync
    log
    manifest
    patchdir
    path
    progress
    robust
    selection
    statistics
    tarfile
    tempdir
    util

## VERSION
    0.8.21

## FILE
    /usr/lib/python3/dist-packages/duplicity/__init__.py


