IperBackup - a Ipernity backup script ===================================== IperBackup gives you the possibility to completely download all documents in you Ipernity 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 (best installed from bottom to top): - 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 Usage ===== 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 you 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. That's all. Have fun using it! Comments and critics are always welcome at: doomy@pebcak.de $Id$