Koozali.org formerly Contribs.org

lat-restore use

lat-restore use
« on: April 11, 2014, 12:31:52 PM »
hi, i'm sure i'm missing something obvious, but could someone point me in the direction of some intructions of how to use lat-restore

I've created the files ok using lat-dump -d, but can't see how lat-restore is used. I've tried just putting lat-restore from the directory containing the dump files, no error is given but nothing appears to change or run.

Are there arguments to use with lat-restore as there are with lat-dump?

any help much appreciated.

Offline mmccarn

  • *
  • 2,563
Re: lat-restore use
« Reply #1 on: April 11, 2014, 01:19:23 PM »
There is a 'lat-restore' executable in /usr/sbin - this is *not* the lat-restore you want to run.

When you run lat-dump, a new "lat-restore" script is created in the folder with your "dump" files. That file contains the commands that lat is going to use to restore each type of information (users, pseudonyms, ibays, etc).

On my system (hostname "office"), the "lat-restore" generated by "lat-dump" looks like this:
Quote from: lat-dump created version of lat-restore
#!/bin/bash
echo 'This script was automatically created by lat-dump and will recreate all user'
echo 'accounts, ibays, etc on this server.'
echo 'Do you want to continue (Y/N)?'
read c
if [ $c = "y" ] || [ $c = "Y" ]; then
   /usr/sbin/lat-users -a -i=office.Users
   /usr/sbin/lat-pseudonyms -a -i=office.Pseudonyms
   /usr/sbin/lat-procmail -i=office.Procmail
   /usr/sbin/lat-quota -i=office.Quota
   /usr/sbin/lat-groups -a -i=office.Groups
   /usr/sbin/lat-pptp -i=office.PPTP
   /usr/sbin/lat-ibays -a -i=office.Ibays
   /usr/sbin/lat-domains -a -i=office.Domains
   /usr/sbin/lat-hosts -a -i=office.Hosts
else
   echo 'Action cancelled!'
fi

The same folder also contains files named "office.Users", "office.Pseudonyms", etc.

Re: lat-restore use
« Reply #2 on: April 11, 2014, 01:27:44 PM »
thanks for the reply,

Yes i get the lat-restore file generated, and it looks the same as yours.

If i just run "lat-restore" from that directory, nothing actually happens, it doesn't show any of the echoed text in the script, just simply does nothing, but no errrors are given so it's recognising that there's a script with that name in the folder...any thoughts?

Re: lat-restore use
« Reply #3 on: April 11, 2014, 01:34:33 PM »
Ah i see what i'm missing, the ./ to make sure it's running that version of the file!


Re: lat-restore use
« Reply #4 on: April 15, 2014, 02:27:54 AM »
Moving to Contribs section of the Forums.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.