Skip to content
This repository has been archived by the owner on Jun 18, 2021. It is now read-only.
wneessen edited this page Jan 7, 2011 · 14 revisions

IperBackup

What is IperBackup

IperBackup is a simple command line tool (CLI) written in Perl. IperBackup gives you the possibility to completely download all documents and comments in you http://www.ipernity.com account. You can either let IperBackup do all the work, so that it fetches all information and downloads every single file or you let IperBackup just create a download URL list, which you can use with your favourite DL manager.

Requirements

To use IperBackup your system needs to have the following requirements installed:

  • Perl 5.8.x (or higher)

  • Ipernity::API 0.09 (or higher)

  • Date::Manip

  • XML::Simple

  • LWP::UserAgent

  • URI

  • HTTP::Request

  • Digest::MD5

  • Log::Log4perl

  • Getopt::Long

  • Time::HiRes

CPAN 101

To check if the corresponding perl module is installed, you can use the following command:

perl -M<module name> -eprint
e. g.: perl -MIpernity::API -eprint

If this command returns an error message, the module is missing on your system. If nothing is returned, everything is fine.

To install a module, the easiest way is to use CPAN. CPAN is the "Comprehensive Perl Archive Network". To install a module you can use the follwoing command.

perl -MCPAN -eshell

This will start the CPAN shell for you. Once you see the "cpan>" prompt, just enter "install <module name>" and CPAN will fetch the module and install it locally on your system

Using IperBackup

The usage of IperBackup is pretty simple. First you have to decide which action to use:

-l, --list      to create a list with all download URL, to use in your DL manager
or
-d, --download  to let IperBackup download each file for your
the options are mutual exclusive and mandatory. Otherwise IperBackup will just display the help output.

You should also specify an output directory, so IperBackup knows where to store your files (or the URL list). If you don't specify the output directory, IperBackup will use /var/tmp. The parameter for this is:

-o, --outdir

You also will need a config file, where you define some parameters, which are mandatory to IperBackup (e. g. your API AuthToken and the API UserID). By default IperBackup will look for the config file in /etc/IperBackup.conf. If you wanna use another file, just use the:

-c, --config

parameter to tell IperBackup where to find the config file.

If you haven't specified your API UserID and AuthToken in the config file, IperBackup will generate and fetch both for you, so you can add it to your config file. Once both parameters are set in your config file, IperBackup won't bother you about this anymore.

If you like to fetch only a specific media type (there are: audio, photo, video and other), you can use the -m (or --media) parameter. You can specify just one media type, but also you can specify more media types at once. Here are two examples:

-m video
or
--media video,audio,other

In case you like to fetch only a documents with a list of specified tags, you can use the -t (or --tags) parameter. You can provide one or more tags (up to 20). The search will be more limited, the more tags you provide. Here are two usage examples:

-t 2009
or
--tags 2009,cologne,water

You also have to the possiblity to fetch comments for each documents (if there are some present). Just use the -n (or --comments) parameter and your comments will be automatically fetched and stored in the same directory as your output directory (with a trailing _comments.txt added to the original filename). If you already fetched all your files, but forgot the comments, you can add the "--commentsonly" parameter to your download job and it will only fetch the comments and store them into the output directory.

If you want to fetch only documents within a specific timeframe, you can use the following two parameters:

-s or --startdate <date in UTC>
and
-e or --enddate <date in UTC>

The specified date has to be UTC. If you leave the start date it will use the start of the UNIX epoch time (1970-01-01 00:00:00) and if you leave out the end date it will use the current time.

When downloading files from your Ipernity account IperBackup will skip files which are already present in your local output directory. If you want those files downloaded anyhow use the following switch to have IperBackup add a timestamp to the original file name and place it in your local directory

-ts or --timestamp

By default IperBackup will fetch the permissions (Ipernity-wise) for each document and will store it in the filename. The permission string will be stored in the beginning of the filename. The result will look something like this:

perm_public-<original filename> for public files,
perm_private-<original filename> for only private,
perm_familyonly-<original filename> for private + family,
perm_friendonly-<original filename> for private + friends,
perm_familyandfriend-<original filename> for private + family + friends.

You can disable this behaviour by using this switch:

-p or --nopermission

Thus the file will be saved with their original filename.

Discuss IperBackup

IperBackup got its own forum now to discuss technical questions. Find it at: http://nop.li/iperforum

To report bugs or request features, please use github's issue tracker

Getting IperBackup

You can find download packages of the latest stable source code and the binary releases in the github download directory (see files.md5 or files.sha256 for checksums)

IperBackup Source package

IperBackup_src.tar.gz

IperBackup_src.zip

IperBackup Windows binary package

IperBackup_win32.tar.gz

IperBackup_win32.zip

IperBackup MacOS binary package

IperBackup_macos.tar.gz

IperBackup_macos.zip

IperBackup Linux binary package

IperBackup_linux.tar.gz

IperBackup_linux.zip

Ipernity Repository

You can find the latest development release in the IperBackup GIT repository at https://github.com/wneessen/IperBackup

Caveats

Starting with release 0.08 IperBackup requires at least the Ipernity::API module version 0.09

Author

Winfried Neessen <doomy@dokuleser.org>

Thanks

Special thanks go to the following people for their work/support with IperBackup

  • Falko Zurell (@maxheadroom) for his contribution to the IperBackup documentation

Copyright (c) 2010-2011, Winfried Neessen <doomy@dokuleser.org> All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • 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.

  • Neither the name of the neessen.net nor the names of its contributors may 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 <COPYRIGHT HOLDER> 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.