Borg-Import Documentation¶
What is borg-import?¶
borg-import converts backups made with other backup software into the format used by BorgBackup.
See borg-import -h
for more information.
Potential advantages over manually doing it¶
Note: we have different importers and some importers may not support all the features.
- automation: less manual work, import lots of backups into a borg repo with one command
- automatically makes up borg archive name from what you give + discovered timestamp
- sets borg archive creation timestamp to the historically correct date/time
- temporarily moves the source directory so the borg files cache will speed up borg create
Currently supported import formats¶
rsnapshot¶
Usage: borg-import rsnapshot SNAPSHOT_ROOT BORG_REPOSITORY
See borg-import rsnapshot -h
for help.
Simple rsync with hard links¶
Assumes one folder per archive, with changes being tracked based on last modification time (mtime).
Usage: borg-import rsynchl RSYNC_ROOT BORG_REPOSITORY
See borg-import rsynchl -h
for help.
Backup tools based on rsync with hard links¶
borg-import should, in principle, be able to import backups from any backup tool that is based on rsync with hard links. This requires that the tool matches the assumptions listed above for simple rsync.
- backintime
- others?
Installation¶
To install Borg-Import, you need Python 3 and pip installed. You can then either download borg-import directly
or clone it from the `githubrepo`_.
Extract the downloaded .zip if necessary.
Open a terminal in the borg-import directory and execute the following to install the program via pip:
pip install --user -e .
If you have /home/user/.local/bin/ in your PATH
variable, you can then start using Borg-Import.
Otherwise, you will need to add .local/bin/ to your PATH
.
Quick Start¶
This chapter will get you started with Borg-Import.
Usage¶
borg-import
consists of a number of commands, one for each
backup system supported. Each accepts a number of arguments and
options. The following sections will describe each in detail.
General¶
Note that Borg-Import will ask you for your repo’s passphrase
which blocks the import until you enter it. To let Borg-Import
continue automatically, you can pass the environment variable
BORG_PASSPHRASE:
BORG_PASSPHRASE=xxxxxx borg-import ....
borg-import rsnapshot¶
borg-import rsnapshot <options> RSNAPSHOT_ROOT BORG_REPOSITORY
- positional arguments
- RSNAPSHOT_ROOT
- Path to rsnapshot root directory
- BORG_REPOSITORY
- Borg repository (must be an absolute local path or a remote repo specification)
- optional arguments
-h
,--help
- show this help message and exit
--backup-set
- Only consider given backup set (can be given multiple times).
- Common options
--create-options
,-o
- Additional borg create options (note: Use -o=”–foo –bar” syntax to avoid parser confusion).
--prefix
- Add prefix to imported archive names
--debug
- Display debug/trace messages.
Description¶
Imports from rsnapshot backup sets by renaming each snapshot to a common name independent of the snapshot (and the backup set), which allows the Borg files cache to work with maximum efficiency.
The directory is called “borg-import-dir” inside the rsnapshot root, and borg-import will note which snapshot is currently located there in a file called “borg-import-dir.snapshot” besides it, in case things go wrong.
Otherwise nothing in the rsnapshot root is modified, and neither are the contents of the snapshots.
Frequently asked questions¶
My old backup program isn’t officially supported. Can I still use borg-import?¶
Chances are good that your old backup program is using some
kind of rsync+hardlinks mechanisms that will work with
Borg-Import’s rsynchl
mode. If you’re unsure, try to find
out or ask how the program is organizing its backups.
Support for the software Back In Time was discovered by
simply trying it out.
Support¶
Please first read the docs, the existing issue tracker issues and mailing list posts – a lot of stuff is already documented / explained / discussed / filed there.
Issue Tracker¶
If you’ve found a bug or have a concrete feature request, please create a new ticket on the project’s issue tracker.
For more general questions or discussions, IRC or mailing list are preferred.
Chat (IRC)¶
Join us on channel #borgbackup on chat.freenode.net.
As usual on IRC, just ask or tell directly and then patiently wait for replies. Stay connected.
You could use the following link (after connecting, you can change the random nickname you get by typing “/nick mydesirednickname”):
http://webchat.freenode.net/?randomnick=1&channels=%23borgbackup&uio=MTY9dHJ1ZSY5PXRydWUa8
Mailing list¶
To find out about the mailing list, its topic, how to subscribe, how to unsubscribe and where you can find the archives of the list, see the mailing list homepage.
Bounties and Fundraisers¶
We use BountySource to allow monetary contributions to the project and the developers, who push it forward.
There, you can give general funds to the borgbackup members (the developers will then spend the funds as they deem fit). If you do not have some specific bounty (see below), you can use this as a general way to say “Thank You!” and support the software / project you like.
If you want to encourage developers to fix some specific issue or implement some specific feature suggestion, you can post a new bounty or back an existing one (they always refer to an issue in our issue tracker).
As a developer, you can become a Bounty Hunter and win bounties (earn money) by contributing to Borg-Import, a free and open source software project.
We might also use BountySource to fund raise for some bigger goals.
Authors & License¶
Borg-Import Contributors (“The Borg Collective”)¶
- Thomas Waldmann <tw@waldmann-edv.de>
- Ryan Kowalewski
- Marian Beermann <public@enkore.de>
License¶
Copyright (C) 2016-2022 The Borg Collective (see AUTHORS file)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. The name of the author may not be used to endorse or promote
products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.