Remote REPL for debugging a Thrasher daemon.
[thrasher.git] / perl / migrator.pl
blobb34ae5667e268967ba34efbed6acd95b2a494c4f
1 #!/usr/bin/perl
3 use strict;
4 use warnings;
6 # This is a Migrator script. It converts from one backend to another.
7 # It is primarily intended to convert from a Python-transport backend
8 # to the DBI backend, but in theory, this works with any combination.
10 # If you are the only user of your transport, or you have a very
11 # small number, my advice is not to bother with this. Your roster
12 # will still be downloaded from the legacy service. This is for
13 # large installations that may have hundreds of users.
15 # Some backends may only have partial support for the interface
16 # Thrasher requires, so a migration is necessary.
18 # The interface here is that you need to set up the Source backend
19 # and the Destination backend up here at the top, then the code
20 # does the rest.
22 ###
23 ### SOURCE BACKEND
24 ###
26 my $source_backend = 'Test';
27 my $source_backend_configuration =
32 ###
33 ### DESTINATION BACKEND
34 ###
36 my $destination_backend = 'Test';
37 my $destination_backend_configuration =
43 ###
44 ### PERL CODE - don't touch this
45 ###
47 use Thrasher::Backend::Migrate;
48 Thrasher::Backend::Migrate::migrate($source_backend,
49 $source_backend_configuration,
50 $destination_backend,
51 $destination_backend_configuration,
52 dry_run => 1);