Hetzner - DokuWiki

Backup/en

Inhaltsverzeichnis

Backup Space

All dedicated/virtual server clients can order backup space with their server. Backup space can only be accessed from within the Hetzner network. Any server located at Hetzner can connect to the backup space.

The available backup space options, as well as their prices, can be found in the table below:

Backup Space Monthly Fee Setup Fee
100 GB* € 4.12* € 4.12*
500 GB € 8.32 € 8.32
2,000 GB € 16.72 € 16.72
5,000 GB € 37.73 € 37.73
10,000 GB € 67.14 € 67.14

*A server costing € 41.18 per month or more can get 100 GB backup space for free.

Prices plus VAT, if applicable.

Ordering Backup Space

Backup space can be ordered via the Robot. Under "Main Functions; Server" select the desired server and then open the tab "Backup". Here you can order different sizes of backup space, as well as up/downgrading your current backup space.

Functions in the Robot

Under the "Backup" tab of your server in the Robot you can complete the following tasks:

  • Order backup space
  • Up/downgrade backup space
  • Delete backup space
  • Generate a new password
  • Graphically display the current usage (updated every 10 minutes)

General Notes

The upload speed for backup space is dependent on how many other clients are simultaneously accessing the same backup server. Consider running your backups at another time if you experience performance problems.

It is important to use the DNS names assigned to your backup space (<username>.your-backup.de) instead of the underlying IP address, as the IP address can change.

Useful Software

Accessing Backup Space

Backup space can be accessed via various different protocols.

FTP/SFTP/SCP

You can access your backup space by means of FTP, SFTP and SCP. Please use the host names assigned to you (<username>.your-backup.de) as well as your username and password.

Public Key Authentication

For SFTP/SCP it is possible to authenticate yourself with a Public Key. More information, as well as an example, can be found on the following wiki page: Backup Space SSH Keys.

Restrictions

It is not possible to create the folders "/etc" or "/lib" on backup space.

Connection Error

11: Application Error

If you receive this error when trying to connect via SFTP or SCP, then this could be the result of SSH Key Forwarding being activated. Please deactivate this for the backup space, and try connecting again.

SAMBA/CIFS

You have the option of integrating your backup space with Samba/Cifs. To do so, you can use the following UNC path:

\\<username>.your-backup.de\backup
mount.cifs -o user=<username>,pass=<password> //<username>.your-backup.de/backup /PATH/FOLDER

Furthermore, with the following line of code in /etc/fstab the backup space will be mounted automatically during boot time:

//<username>.your-backup.de/backup /mnt/backup-server       cifs    iocharset=utf8,rw,credentials=/etc/backup-credentials.txt,uid=<System account>,gid=<System group>,file_mode=0660,dir_mode=0770 0       0

The file /etc/backup-credentials.txt (mode 0600) should contain the following two lines:

username=<username>
password=<password>

On Debian-based distributions, the command is provided via the package cifs-utils

apt-get install cifs-utils

WebDAV

You can access your backup account using WebDAV and use davfs to integrate your backup account.

To mount the WebDAV directory, the following command can be used:

mount -t davfs https://<username>.your-backup.de /MOUNTPOINT

You can also use the following line in /etc/fstab to automate the mounting procedure each time the system is started:

https://<username>.your-backup.de /MOUNTPOINT davfs
rw,uid=<System account>,gid=<System group>,file_mode=0660,dir_mode=0770 0 0

So that the WebDAV directory can mount automatically, you need to add the following line in the /etc/davfs2/secrets file:

https://<username>.your-backup.de <username> <password>

On Debian based distributions, davfs2 is provided under the package of the same name.

apt-get install davfs2

RSYNC

Note: This procedure is experimental and therefore not officially supported

The direct use of rsync is not possible. Backup space can, however, be locally mounted using smbfs, sshfs or ftpfs, which allows a limited use of rsync. To take full advantage of rsync (such as incremental backups using hardlinks) an image file must be created, which should be mounted via loopback. In addition to this, it is also possible to add encryption via encfs (Encrypted File System) to protect the data.

IPv6

You can access your backup space with the same hostname via IPv6.

Determining memory usage

To find out how much free space you have (be it via backup scripts or status emails) you can use the program "sftp":

apt-get install sftp
echo "df"     | sftp <username>@BACKUPSERVER
echo "df -h"  | sftp <username>@BACKUPSERVER
echo "df -hi" | sftp <username>@BACKUPSERVER

"lftp" can also be used. However, under certain circumstances lftp can give you incorrect values, which is why sftp is recommended. The following is the variant with lftp:

# apt-get install lftp
# echo du -hs .  \
| lftp -u <username>,<password> BACKUPSERVER

The following command allows you to use a hook to link with Tartarus by inserting the following lines in the Tartarus configuration:

TARTARUS_POST_PROCESS_HOOK() {
echo "du" | /usr/bin/lftp -u "$STORAGE_FTP_USER,$STORAGE_FTP_PASSWORD" "$STORAGE_FTP_SERVER" | awk -v LIMIT=100 '$2=="." {print ((LIMIT*1024*1024)-$1)/1024 " MiB backup space remaining"}'
}


© 2014. Hetzner Online AG. Alle Rechte vorbehalten.