Index: /LATMOS-Accounts/bin/la-sync
===================================================================
--- /LATMOS-Accounts/bin/la-sync	(revision 72)
+++ /LATMOS-Accounts/bin/la-sync	(revision 73)
@@ -16,5 +16,5 @@
 Show configured bases:
 
-    la-sync [options]
+    la-sync [sync name] [options]
 
 =cut
@@ -48,8 +48,11 @@
 my $LA = LATMOS::Accounts->new($config);
 
-my $sync = $LA->create_synchro($from, [ @to ]);
-$sync->load_dest and return;
-$sync->process(
+my $sync = $LA->create_synchro(
+    $ARGV[0],
+    from => $from,
+    to => (@to ? [ @to ] : undef),
     nocreate => $nocreate,
     test     => $test,
-) or warn "Sync has failed\n";
+) or die "cannot create sync object\n";
+$sync->load_dest and return;
+$sync->process() or warn "Sync has failed\n";
Index: /LATMOS-Accounts/lib/LATMOS/Accounts.pm
===================================================================
--- /LATMOS-Accounts/lib/LATMOS/Accounts.pm	(revision 72)
+++ /LATMOS-Accounts/lib/LATMOS/Accounts.pm	(revision 73)
@@ -17,5 +17,6 @@
 
     my $self = Config::IniFiles->new(
-        -file => $config
+        -file => $config,
+        '-default' => '_default_',
     );
 
@@ -62,5 +63,6 @@
     my ($self) = @_;
     grep {
-        !m/^_.*_$/
+        !m/^_.*_$/ &&
+        !m/^sync:/
     } $self->Sections
 }
@@ -77,35 +79,44 @@
 }
 
-sub config_sync_base {
-    my ($self, $from) = @_;
-    return split(/ /, $self->val($from, 'push', ''));
-} 
+sub sync_from_name {
+    my ($self, $syncname) = @_;
+    return if (!$syncname);
+    $self->val("sync:$syncname", 'from', $self->default_base_name);
+}
 
 sub create_synchro {
-    my ($self, $from, $to, %options) = @_;
+    my ($self, $name, %options) = @_;
 
-    my $labfrom = $from ? $self->base($from) : $self->default_base;
+    # taking options from config
+    if ($name) {
+        foreach my $param ($self->Parameters("sync:$name")) {
+            warn "$param $options{$param}";
+            if (!defined($options{$param})) {
+                my @args = $self->val("sync:$name", $param);
+                warn join(', ', $param, @args);
+                $options{$param} = ($args[1] || $param eq 'to')
+                    ? [ @args ]
+                    : $args[0];
+            }
+        }
+    }
 
-    my @labto = map { $self->base($_) }
-        @{ $to || []}
-        ? @{ $to }
-        : ($self->config_sync_base($from
-                ? $from
-                : $self->default_base_name));
+    my $labfrom = $options{from} ? $self->base($options{from}) : $self->default_base;
+
+    my @labto = map { $self->base($_) } @{ $options{to} || []} or return;
 
     my $sync = LATMOS::Accounts::Synchro->new(
         $labfrom, [ @labto ],
         state_file => $self->val('_default_', 'state_file'),
+        %options,
     );
 }
 
 sub sync_access {
-    my ($self, $bases) = @_;
-    my @obases = scalar(@{ $bases || []})
-        ? map { $self->base($_) } @{ $bases || []}
-        : (
-            $self->default_base,
-            map { $self->base($_) }
-            $self->config_sync_base($self->default_base_name));
+    my ($self, $name, %options) = @_;
+
+    my @obases = $name 
+        ? (map { $self->base($_) } ($self->sync_from_name($name), $self->val("sync:$name", 'to')))
+        : map { $self->base($_) } @{ $options{bases} || []};
     LATMOS::Accounts::SynchAccess->new([ @obases ]);
 }
Index: /LATMOS-Accounts/lib/LATMOS/Accounts/Synchro.pm
===================================================================
--- /LATMOS-Accounts/lib/LATMOS/Accounts/Synchro.pm	(revision 72)
+++ /LATMOS-Accounts/lib/LATMOS/Accounts/Synchro.pm	(revision 73)
@@ -58,4 +58,5 @@
     
     $self->{from} = $from;
+    $self->{options} = { %options };
 
     # allow ref and array ref of, eg
@@ -128,9 +129,9 @@
                     my %fields = map { $_ => $sobj->get_c_field($_, 'r') } @common_fields;
                     my $dobj = $destbase->get_object($otype, $uid);
-                    $dobj->set_c_fields(%fields) unless($options{test});
+                    $dobj->set_c_fields(%fields) unless($self->{options}{test});
                     warn "  $otype $uid: synched\n";
-                } elsif (!$options{nocreate}) {
+                } elsif (!$self->{options}{nocreate} && !$options{nocreate}) {
                     my %fields = map { $_ => $sobj->get_c_field($_, 'r') } @common_fields;
-                    $destbase->create_c_object($otype, $uid, %fields) unless($options{test});
+                    $destbase->create_c_object($otype, $uid, %fields) unless($self->{options}{test});
                     warn "  $otype $uid: created\n";
                 }
@@ -141,5 +142,5 @@
 
 sub process {
-    my ($self, %options) = @_;
+    my ($self) = @_;
 
     $self->from->load or return;
@@ -170,5 +171,4 @@
             grep { $fields{$_} == 2 } keys %fields;
         },
-        %options
     );
     $self->_traverse(
@@ -190,6 +190,6 @@
             grep { $fields{$_} == 2 } keys %fields;
         },
-        %options, nocreate => 1,
-    ) unless($options{nocreate} || $options{test});
+        nocreate => 1,
+    ) unless($self->{options}{nocreate} || $self->{options}{test});
 
     foreach ($self->to) {
@@ -198,5 +198,6 @@
     }
 
-    $self->RewriteConfig if($self->GetFileName && !($options{nocreate} || $options{test}));
+    $self->RewriteConfig
+        if($self->GetFileName && !($self->{options}{nocreate} || $self->{options}{test}));
     
     1;
