OnWorks favicon

hdup - Online in the Cloud

Run hdup in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command hdup that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



hdup - harddisk duplicator/harddisk backupper - backup to harddisk


hdup [ OPTION ] SCHEME HOST [ @USER@REMOTEHOST ] (1st format)
hdup [ OPTION ] restore HOST DATE DIRECTORY [ @USER@REMOTEHOST ] (2nd format)


Hdup is used to backup a filesystem. Features include:

o incremental backups: monthly, weekly and daily dumps,

o encryption of the archive (via mcrypt or GPG),

o compression of the archive (bzip/gzip/lzop/none),

o possibility to transfer the archive to a remote host,

o possibility to restore the archive from a remote host,

o ability to split up archives,

o no obscure archive format (it is a normal compressed tar file), and

o simple to use.

The behaviour of hdup is controlled by its configuration file (see hdup.conf(5)).
Internally hdup uses GNU tar to actually create the backups.

First format
When using the 1st format hdup performs a backup. Remember: hdup pushes a backup from the
localhost to the remote host.

The sort of backup is specified by SCHEME:

Make a full (null) dump of the filesystem.

weekly Make an incremental dump of the filesystem relative to the latest monthly dump. If
hdup cannot find a monthly dump it will complain, unless always backup is on. Then
a monthly dump will be performed.

daily Make an incremental dump of the filesystem relative to the latest weekly dump. If
hdup cannot find a weekly dump it will complain, unless always backup is on. Then a
weekly dump will be performed.

HOST is the host of which hdup should perform the backup. This should match a '[HOST]'
statement in the configuration file. The directories of that host (specified with 'dir =
dir1, dir2', ...) will be backed up to the directory specified with 'archive dir = dir'.
If HOST is not found no backup will be made.

@USER@REMOTEHOST is the host to which the archive should be transfered. This must include
the user name. E.g @[email protected]. It is illegal to specify the colon ':'.
hdup must be present on the remote host. The location of this remote hdup is specified
using remote hdup.

Any program capable of transferring files can used for this purpose. Currently tested is
ssh. Other programs like rsync (not tested) may also work. Any program with the following
characteristics will do:

o must be usable as a filter (read from stdin, write to stdout),

o must support user@remotehost syntax.

Second format
When using the 2nd format a previous backed up filesystem is restored. Remember: hdup
pushes a restore from the remote to the local host. This is opposite from the backup

HOST is the host who's archives should be restored.

DATE everything up to this date will be restored. hdup will look for the most recent
monthly archive, then the most recent weekly and finally for the daily to pad up to date
given. The DATE can either be specified as DD-MM-YYYY (date spec = default), as YYYY-MM-DD
(date spec = iso) or as MM-DD-YYYY (date spec = american). This is controlled from the
configuration file.

A special date is 'static' which instructs hdup to look in the 'static' directory. This is
used when 'no history = yes'. This is dangerous to use because hdup will overwrite the old
backup file with the new one. When your system crashes during the overwrite you have no
backup at all! Only use this when you really don't have room for two monthly backups.

Another special date is 'today' which instructs hdup to use the current date.

DIRECTORY tells hdup to which directory the archive should be untarred to. Be very careful
when running hdup as root and specifying '/' as the directory. Version 1.4 and above
refuses to restore to '/'. This can be overridden by specifying 'force = on/yes' in the

@USER@REMOTEHOST is the host to which the archive should be restored. This must include
the user name. E.g @[email protected]. As as version 1.6.6 it is illegal to
specify the colon ':'. On the remosthost and in DIRECTORY the archive is restored. hdup
must be present on the remote host.

Status message
When hdup is finished with its current operation it will print an overview message:

Hdup version.: 1.6.6

Host.........: elektron
Date.........: 2003-02-02
Scheme.......: monthly
Archive......: elektron.2003-02-02.monthly.tar.gz
Encryption...: no
Archive size.: 257k
Elapsed......: 0:01:27
Status.......: successfully performed backup

Which can be mailed to you via cron.


-c, --config=config
Location of the configuration file. The default location of hdup's configuration
file is /etc/hdup/hdup.conf.

-s, --specific=file
Restore a specific file from an archive. file must be the full path to the file,
relative paths will not work.

-i, --ignore-tar
Ignore tar errors when restoring.

-I, --ignore-conf
Ignore errors in the configuration file.

-P, --patched_tar
Tar is patched so that it can handle --no-recursion, --listed-incremental and
--files-from together. This options enables two things in hdup; 1) directory info
is written to 'filelist' and 2) --no-recursion is given to tar.

This solves the bug whereby hdup wouldn't include directory information in the

-d, --dryrun
Do a dryrun - don't do anything with the filesystem

-q, --quiet
Suppress the output of the subprocesses (like 'tar' and 'ssh').

-q -q, --quiet --quiet
Suppress the logging output from hdup.

-q -q -q, --quiet --quiet --quiet
No logging at all. Even no overview message.

-V Be more verbose.

-V -V Be even more verbose. This will show which files are backed up by hdup IF you also
supply the -D option.

-h, --help
A help message.

-v, --version
Show the version of hdup.

-D, --debug
Show a lot of information which can aid debugging.

The -V and -q options do not effect each other. A '-qqq -VV' option list will mean that
hdup will show what is run, but nothing else (no overview message and no warning nor


hdup can encrypt the archives, mcrypt is used for the actual encryption. As of version
1.6.25 GPG can also be used to encrypt the archive. Note that currently remotely restoring
a GPG encrypted archives is not working.

With mcrypt --list you get a list of the algorithms mcrypt supports:

serpent (32): cbc cfb ctr ecb ncfb ofb nofb
wake (32): stream
loki97 (32): cbc cfb ctr ecb ncfb ofb nofb
rijndael-128 (32): cbc cfb ctr ecb ncfb ofb nofb
rijndael-192 (32): cbc cfb ctr ecb ncfb ofb nofb

If you want to use loki97 you specify algorithm = loki97 in hdup.conf. The same goes for
all the other algorithms.

To use GPG the following is needed. Set algorithm = gpg and key = user ID of key. In my
case I've created a GPG key with user ID of 'miekg' so I use:
algorithm = gpg
key = miekg
The key is supplied to gpg with the -r argument. See the manpage of gpg for more details.

When restoring a GPG encrypted archive you will be prompted to unlock your private key.

Use hdup online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    libjpeg-turbo is a JPEG image codec
    that uses SIMD instructions (MMX, SSE2,
    NEON, AltiVec) to accelerate baseline
    JPEG compression and decompression on
    x86, x8...
    Download libjpeg-turbo
  • 2
    Xtreme Download Manager
    Xtreme Download Manager
    The project has a new home now:
    https://xtremedownloadmanager.com/ For
    https://github.com/subhra74/xdm Xtreme
    Download Manager is a powerful tool t...
    Download Xtreme Download Manager
  • 3
    TTGO VGA32 Lite
    TTGO VGA32 Lite
    Features:4:3 and 16:9 low resolution
    VGA outputPS/2 keyboard and mouse
    inputText-based user interface (TUI)
    with dialog managerPartial Unicode
    supportSlave dis...
    Download TTGO VGA32 Lite
  • 4
    Clover EFI bootloader
    Clover EFI bootloader
    Project has moved to
    Features:Boot macOS, Windows, and Linux
    in UEFI or legacy mode on Mac or PC with
    Download Clover EFI bootloader
  • 5
    Join us in Gitter!
    Enable the URPMS repository in your
    system -
    Download unitedrpms
  • 6
    Boost C++ Libraries
    Boost C++ Libraries
    Boost provides free portable
    peer-reviewed C++ libraries. The
    emphasis is on portable libraries which
    work well with the C++ Standard Library.
    See http://www.bo...
    Download Boost C++ Libraries
  • 7
    VirtualGL redirects 3D commands from a
    Unix/Linux OpenGL application onto a
    server-side GPU and converts the
    rendered 3D images into a video stream
    with which ...
    Download VirtualGL
  • More »

Linux commands