Debian Codegraph @

docs/backup.rst

raw
1 .. _backup:
2
3 Backup
4 ======
5
6 This page describes how to back up tabs, configuration and commands in
7 CopyQ.
8
9 Back Up All Data Automatically on Exit
10 --------------------------------------
11
12 You can use `command that backs up all items, tabs and settings after exit
13 <https://github.com/hluk/copyq-commands/tree/master/Scripts#backup-on-exit>`__.
14
15 To install the command see `the description in the repository
16 <https://github.com/hluk/copyq-commands/blob/master/README.md>`__.
17
18 Back Up Manually
19 ----------------
20
21 To back up all the data, **exit the application** first and **copy
22 the configuration directory** and **the data directory**.
23
24 Path to the configuration is usually:
25
26 - Windows: ``%APPDATA%\copyq``
27 - Portable version for Windows: ``config`` sub-folder in unzipped
28 application directory
29 - Linux: ``~/.config/copyq``
30
31 Path to the data is usually:
32
33 - Windows: ``%APPDATA%\copyq\items``
34 - Portable version for Windows: ``items`` sub-folder in unzipped
35 application directory
36 - Linux: ``~/.local/share/copyq/copyq/items``
37
38 To copy the configuration path to clipboard from CopyQ:
39
40 1. Open Action dialog (``F5`` shortcut).
41 2. Enter the command:
42
43 .. code-block:: js
44
45 copyq:
46 dir = Dir(info('config') + '/..')
47 copy(dir.absolutePath())
48
49 3. Click OK dialog button.
50
51 To copy the data path, change ``'config'`` to ``'data'``.
52
53 To restore the backup, exit the application and replace the
54 configuration directory.
55
56 .. warning::
57
58 Before making or restoring back up, always exit CopyQ
59 (don't only close the main window).
60
61 Export and Import
62 -----------------
63
64 You can easily export selected tabs and optionally
65 configuration and commands within the application.
66
67 .. warning::
68
69 Exported data is **not encrypted by default**. When exporting from the GUI,
70 CopyQ prompts for an optional export password — if provided, tab data in the
71 export file is encrypted with that password. The ``exportData`` script
72 command does not support this and always exports unencrypted. If a tab is
73 synchronized with a directory on disk, the files themselves are not exported.
74
75 To export the data click "Export..." in "File" menu, select what to
76 export, confirm with OK button and select target file to save.
77
78 To restore the data click "Import..." in "File" menu, select file to
79 import and select what to import.
80
81 .. note::
82
83 Import will not overwrite existing tabs and commands but create new ones.
84
85 Alternatively you can use command line for export and import everything
86 (selection dialogs won't be opened).
87
88 .. code-block:: bash
89
90 copyq exportData {FILE/PATH/TO/EXPORT}
91 copyq importData {FILE/PATH/TO/IMPORT}