Hi Patrick,

I have attached a HowTo  showing the steps i took to restore from
automatic backup on Ubuntu.

I tried to put it on the wiki, but can't seem to get registered.

The Restore from Backup on commandline usage is given in the manual as:
Restore data from the automatic backups:
    syncevolution --restore <session directory> --before|--after [--dry-run] 
[--] <config> <source> ...
Here's a HowTo using Ubuntu Precise 12.04.1 lts, with syncevolution-http 
1.2.2-1:

1)Get a list of your synced devices:
syncevolution --print-servers
The output in my case was:
Configured servers:
   defymini = /home/john/.config/syncevolution/default/peers/defymini

1) Find your <session directory> where the automatic backups are stored:
syncevolution --print-sessions defymini 
The output in my case gave a list of the backups, including the path, and 
details of each sync in a table, for example:
/home/john/.cache/syncevolution/defymini-2013-01-10-12-16
+---------------|-----------------------|-----------------------|-CON-+
|               |         LOCAL         |        REMOTE         | FLI |
|        Source | NEW | MOD | DEL | ERR | NEW | MOD | DEL | ERR | CTS |
+---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+
|   addressbook |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
|   two-way, 0 KB sent by client, 0 KB received                       |
|   item(s) in database backup: 755 before sync, 1168 after it        |
|   aborted on behalf of user (local, status 20017)                   |
+---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+
|      calendar |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
|      two-way, 0 KB sent by client, 0 KB received                    |
|      aborted on behalf of user (local, status 20017)                |
+---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+
|          memo |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
+---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+
|          todo |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
|          two-way, 0 KB sent by client, 0 KB received                |
|          aborted on behalf of user (local, status 20017)            |
+---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+
|          start Thu Jan 10 12:16:42 2013, duration 2:58min           |
|           aborted on behalf of user (local, status 20017)           |
+---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+


3) Decide which backup to restore from, and whether to restore from before it, 
or after it.
In my case, as you can see from the table, the number of contacts almost 
doubled during the sync, and i aborted it as i saw all the duplicates being 
written in Evolution!
So I want to restore from Before the backup.

4)So far we can fill in the <session-directory> 
:/home/john/.cache/syncevolution/defymini-2013-01-10-12-16
and we know we want to use the data from before the automatic backup
syncevolution --restore .cache/syncevolution/defymini-2013-01-10-12-16 --before 

5)Always best to do a dry run before committing!:
syncevolution --restore .cache/syncevolution/defymini-2013-01-10-12-16 --before 
--dry-run

6)Add in the <config> data, in my case for the "defymini":
syncevolution --restore .cache/syncevolution/defymini-2013-01-10-12-16 --before 
--dry-run defymini

7)Add the <source>, in my case "addressbook", as i only want to reload those 
data:
syncevolution --restore .cache/syncevolution/defymini-2013-01-10-12-16 --before 
--dry-run defymini addressbook

Success
All looks good? Then run it for real:
syncevolution --restore .cache/syncevolution/defymini-2013-01-10-12-16 --before 
defymini addressbook


_______________________________________________
SyncEvolution mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution

Reply via email to