Warning, /utilities/kbackup/doc/en/index.docbook is written in an unsupported language. File is not indexed.
0001 <?xml version="1.0" ?> 0002 <!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.5-Based Variant V1.1//EN" "dtd/kdedbx45.dtd" [ 0003 0004 <!ENTITY kbackup "<application>KBackup</application>"><!--FIXME remove entitiy when kbackup depends on kdoctools >= 5.42--> 0005 <!ENTITY % addindex "IGNORE"> 0006 <!ENTITY % English "INCLUDE"> 0007 ]> 0008 0009 <book id="kbackup" lang="&language;"> 0010 0011 <bookinfo> 0012 <title>The &kbackup; Handbook</title> 0013 0014 <authorgroup> 0015 <author> 0016 <personname> 0017 <firstname>Martin</firstname> 0018 <surname>Koller</surname> 0019 </personname> 0020 <email>kollix@aon.at</email> 0021 </author> 0022 </authorgroup> 0023 0024 <!-- TRANS:ROLES_OF_TRANSLATORS --> 0025 0026 <copyright> 0027 <year>2006 - 2017</year> 0028 <holder>Martin Koller</holder> 0029 </copyright> 0030 <legalnotice>&FDLNotice;</legalnotice> 0031 0032 <date>2018-01-05</date> 0033 <releaseinfo>Applications 18.04</releaseinfo> 0034 0035 <!-- Abstract about this handbook --> 0036 0037 <abstract> 0038 <para> 0039 &kbackup; is an application which lets you back up your data in a simple, user friendly way. 0040 </para> 0041 </abstract> 0042 0043 <keywordset> 0044 <keyword>KDE</keyword> 0045 <keyword>system</keyword> 0046 <keyword>KBackup</keyword> 0047 <keyword>backup</keyword> 0048 <keyword>storage</keyword> 0049 <keyword>archive</keyword> 0050 <keyword>zip</keyword> 0051 <keyword>gzip</keyword> 0052 <keyword>bzip2</keyword> 0053 <keyword>xz</keyword> 0054 </keywordset> 0055 0056 </bookinfo> 0057 0058 <chapter id="introduction"> 0059 <title>Introduction</title> 0060 0061 <para> 0062 &kbackup; is a program that lets you back up any folders or files, 0063 whereby it uses an easy to use folder tree to select the things to back up. 0064 It lets you save your settings in so-called <quote>profile</quote> files, where a profile is a simple 0065 text file containing definitions for folders and files to be included 0066 or excluded from the backup process. 0067 Also, it lets you define where the backup shall be saved to. 0068 The target can be either a local folder (⪚ a locally mounted device 0069 like a ZIP drive, USB stick, &etc;) but it can also be any remote &URL; 0070 (⪚ smb://remote/some_path) to back up your data to some central server, &etc; 0071 </para> 0072 0073 <para> 0074 The program can also run an automated backup without using a graphical user interface. 0075 One can simply create a profile and use these settings to tell &kbackup; what to do 0076 when running in non-interactive mode, ⪚ by starting it from a cron job. 0077 </para> 0078 0079 <para> 0080 The program was designed to be very simple in its use so that it can be used 0081 by non-computer experts. 0082 </para> 0083 0084 <para> 0085 The storage format is the well known TAR format, whereby the data can still be stored 0086 in compressed format (xz, bzip2 or gzip). 0087 </para> 0088 0089 <para> 0090 The current implementation features only the backup step. To restore data back into 0091 your system, you currently have to use, ⪚, &dolphin; to open the TAR backup files 0092 and drag/drop the files back to your file system. 0093 This is also an advantage of the usage of the well known and well supported TAR file 0094 format. 0095 </para> 0096 <para> 0097 If the files are compressed, you can uncompress all files 0098 from the current folder recursively down with the following command: 0099 </para> 0100 <para> 0101 <programlisting>find . -name \*bz2 -print0 | xargs -0 bunzip2</programlisting> 0102 </para> 0103 <para>Alternatively you can use &ark; to extract a full backup or just a few files from a backup.</para> 0104 </chapter> 0105 0106 <chapter id="using-kbackup"> 0107 <title>Using &kbackup;</title> 0108 0109 <para> 0110 All you need to do is to select which folders you want to store. 0111 This is done by selecting all the folders in the tree view on the left side 0112 of the main window. 0113 </para> 0114 0115 <para> 0116 If you select a folder, &kbackup; will automatically store all files and 0117 subfolders below it. 0118 If you want to exclude parts of a selected folder, simply deselect that files/folders 0119 inside the still selected folder. 0120 </para> 0121 0122 <para> 0123 In general, this means: A selected folder will store everything in it and below it, 0124 except the deselected parts in it. 0125 This also means, whenever you reuse a profile (see below) later on and new files 0126 have been added to a folder already selected for backup, all the new files will 0127 also be stored. 0128 </para> 0129 0130 <para> 0131 0132 <screenshot> 0133 <screeninfo>Here's a screenshot of &kbackup;</screeninfo> 0134 <mediaobject> 0135 <imageobject> 0136 <imagedata fileref="mainwindow.png" format="PNG"/> 0137 </imageobject> 0138 <textobject> 0139 <phrase>Screenshot of the Main Window</phrase> 0140 </textobject> 0141 </mediaobject> 0142 </screenshot> 0143 </para> 0144 0145 0146 <sect1 id="kbackup-profiles"> 0147 <title>Using profiles</title> 0148 0149 <para> 0150 To keep a selection for later use, simply save it into a &kbackup; profile file. 0151 Use the <guimenu>File</guimenu> menu and select <guimenuitem>Save Profile</guimenuitem>. 0152 </para> 0153 0154 <para> 0155 To reload a selection into &kbackup;, use the <menuchoice><guimenu>File</guimenu> <guimenuitem>Load Profile...</guimenuitem></menuchoice> menu item. 0156 </para> 0157 0158 <para> 0159 &kbackup; saves in a profile the selections for all included folders/files, 0160 excluded folders/files, the target folder/&URL;, defined archive prefix, 0161 the defined maximum slice file size, &etc; 0162 </para> 0163 0164 <para> 0165 If you want to ease the usage of backing up every day the same set of 0166 files, simply store your settings into a &kbackup; profile (a <filename class="extension">.kbp</filename> file) 0167 and pass that file on the command line. 0168 </para> 0169 0170 <para> 0171 ⪚: 0172 </para> 0173 0174 <para> 0175 <programlisting>kbackup myData.kbp</programlisting> 0176 </para> 0177 0178 <para> 0179 Hint: you can also create a shortcut on your desktop to a <filename class="extension">.kbp</filename> file 0180 as the file type is registered to start &kbackup; on double click. 0181 </para> 0182 0183 </sect1> 0184 0185 <sect1 id="archive-slices"> 0186 <title>Archive slices</title> 0187 <para> 0188 As a medium has normally limited capacity (⪚ 100MB ZIP disc), 0189 &kbackup; will create several archive slices. 0190 </para> 0191 <para> 0192 Each archive slice will get its own name, which looks like this: 0193 </para> 0194 <para> 0195 backup_2006.08.26-13.04.44_1.tar 0196 </para> 0197 <para> 0198 The name contains the creation date and time (which will be the same for all 0199 slices of one backup) and a trailing slice sequence number (_1 in this example). 0200 </para> 0201 <para> 0202 In the menu <menuchoice><guimenu>File</guimenu> <guimenuitem>Profile Settings...</guimenuitem></menuchoice>, you can define a different archive prefix than the 0203 default <quote>backup</quote>. 0204 </para> 0205 0206 <para> 0207 In the <guilabel>Profile Settings</guilabel> dialog, you can also define a maximum archive slice size, 0208 which limits the slice size even if there would be more space left on the target 0209 device. 0210 This helps to create archive slices which can then be later burned on a &CD;/&DVD;, &etc; 0211 If you explicitly limit the size of an archive slice, the available size 0212 will be marked with (*) in the main window. 0213 </para> 0214 <para> 0215 But even if you define a slice to be of <quote>unlimited</quote> size, there are other constraints 0216 which limit the size of a slice: 0217 <itemizedlist> 0218 <listitem><para>limited by the target folder (when stored directly into a local folder)</para></listitem> 0219 <listitem><para>limited by the <filename class="directory">/tmp</filename> folder when we create a tmp file for later upload to a remote &URL;</para></listitem> 0220 </itemizedlist> 0221 </para> 0222 0223 <para> 0224 In the <guilabel>Profile Settings</guilabel>, you can also define a maximum number of full backups being kept 0225 in the target folder, and therefore automatically deleting all older backups there. 0226 ⪚ if you set it to 3, &kbackup; will keep the last 3 backups and delete all older ones. 0227 </para> 0228 0229 </sect1> 0230 0231 0232 <sect1 id="incremental-backup"> 0233 <title>Incremental Backup</title> 0234 <para> 0235 With an incremental backup not all files will be saved every time the backup runs, but only 0236 the files which have changed since the last backup. This has the great advantage that the 0237 incremental backup will usually include much fewer files than a full backup and therefore 0238 will be finished in a much shorter time. 0239 </para> 0240 <para> 0241 This works as follows: In the profile, you define an interval (in days) for the full backup. 0242 ⪚ when you define 5 days, then &kbackup; will do a full backup of all files every 5 days. 0243 Whenever you start &kbackup; before the interval expires with this profile - regardless 0244 how often you run a backup - only the files which have changed since the last backup will 0245 be saved. &kbackup; stores the time stamp of the last backup into the profile and knows 0246 therefore what to do when running the next time. 0247 </para> 0248 <para> 0249 The archive slice files created during an incremental backup will contain the text <quote>_inc</quote>, ⪚: 0250 </para> 0251 <para> 0252 backup_2010.06.14-18.50.26_1_inc.tar 0253 </para> 0254 <para> 0255 Full backup slice files will not include <quote>_inc</quote> in the name, ⪚: 0256 </para> 0257 <para> 0258 backup_2010.06.13-20.58.14_1.tar 0259 </para> 0260 <para> 0261 When one wants to restore files from an incremental backup, it's important to look for 0262 the most recent version of a file to be restored in all <quote>_inc</quote> files and finally also the last full backup 0263 slice file. 0264 This exactly is also the disadvantage of the incremental backup (but no advantage without disadvantage ;-) ) 0265 </para> 0266 <para> 0267 If you want to do a full backup earlier than the defined incremental cycle time defined in a profile, 0268 you can do so by checking the <guilabel>Force Full Backup</guilabel> option in the user interface. 0269 When &kbackup; is started via the command line, this can be achieved by using the option <option>--forceFull</option> 0270 </para> 0271 <para> 0272 A forced full backup will restart the backup cycle, &ie; &kbackup; counts the days to the next full backup 0273 from the time of the last full backup. 0274 </para> 0275 </sect1> 0276 0277 0278 <sect1 id="archive-compression"> 0279 <title>Archive Compression</title> 0280 <para> 0281 &kbackup; will compress the files stored if you activate this 0282 in the profile settings. Depending on 0283 the availability on your system it chooses <command>xz</command>, <command>bzip2</command> or <command>gzip</command> compression. 0284 &kbackup; will compress every single file 0285 and store all files with an added file extension (<filename class="extension">.xz</filename>, <filename class="extension">.bzip2</filename> or <filename class="extension">.gz</filename>) into the 0286 then not-compressed <filename class="extension">.tar</filename> archive. 0287 </para> 0288 0289 <para> 0290 When you have selected to create the backup on some local filesystem 0291 (⪚ your extra disc, ZIP drive, &etc;) - which means you did not 0292 enter a remote target &URL; - &kbackup; might split the whole backup into several archive slices 0293 due to media capacity limitations. 0294 </para> 0295 <para> 0296 ⪚: 0297 </para> 0298 <para> 0299 backup_2006.08.26-13.04.44_1.tar 0300 </para> 0301 <para> 0302 backup_2006.08.26-13.04.44_2.tar 0303 </para> 0304 0305 </sect1> 0306 0307 <sect1 id="automating"> 0308 <title>Automating Backup</title> 0309 0310 <para> 0311 If you want to automate the process of the backup, &kbackup; offers different 0312 command line options to help with this: 0313 <itemizedlist> 0314 <listitem><para><option>--auto</option></para> 0315 <para> 0316 When you run &kbackup; with this option and a given <filename class="extension">.kbp</filename> profile, it will 0317 start, load the given profile, run the backup and terminate when done. 0318 All this is done with a visible &kbackup; user interface. 0319 </para> 0320 </listitem> 0321 0322 <listitem><para><option>--autobg</option></para> 0323 <para> 0324 When you run &kbackup; with this option and a given <filename class="extension">.kbp</filename> profile, it will 0325 run the same process as with <option>--auto</option> but <emphasis>without</emphasis> showing any graphical user interface. 0326 Therefore the suffix <quote>bg</quote> which stands for <quote>background</quote> - everything is done in the background 0327 so this is the right option to be used when you do your backups, ⪚, started by a cron job. 0328 </para> 0329 <para> 0330 When using <option>--autobg</option> the output from &kbackup; - showing the progress of the backup - is written 0331 to stderr. By default, the output includes just a few important messages and a summary at the end. 0332 If you pass <option>--verbose</option> in addition, then you will also see each file name currently being backed up. 0333 </para> 0334 </listitem> 0335 </itemizedlist> 0336 </para> 0337 0338 </sect1> 0339 0340 </chapter> 0341 0342 <chapter id="commands"> 0343 <title>Command Reference</title> 0344 0345 <sect1 id="kapp-mainwindow"> 0346 <title>The main &kbackup; window</title> 0347 0348 <para> 0349 </para> 0350 0351 <sect2> 0352 <title>The File Menu</title> 0353 <para> 0354 <variablelist> 0355 0356 <varlistentry> 0357 <term><menuchoice> 0358 <guimenu>File</guimenu> 0359 <guimenuitem>Open Recent</guimenuitem> 0360 </menuchoice></term> 0361 <listitem><para><action>Shows a submenu with the recently used profiles for easy selection. 0362 </action></para></listitem> 0363 </varlistentry> 0364 0365 <varlistentry> 0366 <term><menuchoice> 0367 <guimenu>File</guimenu> 0368 <guimenuitem>New Profile</guimenuitem> 0369 </menuchoice></term> 0370 <listitem><para><action>Clears the selection and the target input field, to be able to define 0371 a new profile.</action></para></listitem> 0372 </varlistentry> 0373 0374 <varlistentry> 0375 <term><menuchoice> 0376 <guimenu>File</guimenu> 0377 <guimenuitem>Load Profile...</guimenuitem> 0378 </menuchoice></term> 0379 <listitem><para><action>Loads a profile.</action></para></listitem> 0380 </varlistentry> 0381 0382 <varlistentry> 0383 <term><menuchoice> 0384 <guimenu>File</guimenu> 0385 <guimenuitem>Save Profile</guimenuitem> 0386 </menuchoice></term> 0387 <listitem><para><action>Saves all settings into the currently loaded profile.</action></para></listitem> 0388 </varlistentry> 0389 0390 <varlistentry> 0391 <term><menuchoice> 0392 <guimenu>File</guimenu> 0393 <guimenuitem>Save Profile As...</guimenuitem> 0394 </menuchoice></term> 0395 <listitem><para><action>Saves all settings into a profile with a new name.</action></para></listitem> 0396 </varlistentry> 0397 0398 <varlistentry> 0399 <term><menuchoice> 0400 <guimenu>File</guimenu> 0401 <guimenuitem>Profile Settings...</guimenuitem> 0402 </menuchoice></term> 0403 <listitem><para>In the settings, you can define whether the archive-slice files 0404 start with the default name <quote>backup</quote> or with an alternative name. 0405 Also you can limit the archive slice size. See chapter <link linkend="archive-slices">Archive Slices</link>. 0406 These settings are also stored into the profile. 0407 </para></listitem> 0408 </varlistentry> 0409 0410 <varlistentry> 0411 <term><menuchoice> 0412 <shortcut> 0413 <keycombo action="simul">&Ctrl;<keycap>Q</keycap></keycombo> 0414 </shortcut> 0415 <guimenu>File</guimenu> 0416 <guimenuitem>Quit</guimenuitem> 0417 </menuchoice></term> 0418 <listitem><para><action>Quits</action> &kbackup;.</para></listitem> 0419 </varlistentry> 0420 0421 </variablelist> 0422 </para> 0423 </sect2> 0424 0425 <sect2> 0426 <title>The Settings Menu</title> 0427 <para> 0428 <variablelist> 0429 0430 <varlistentry> 0431 <term><menuchoice> 0432 <guimenu>Settings</guimenu> 0433 <guimenuitem>Dock in System Tray</guimenuitem> 0434 </menuchoice></term> 0435 <listitem><para><action> 0436 When this option is activated, an icon is shown in the system tray, which reflects the current 0437 status of a backup operation. An animation is shown when a backup is in progress, else you see 0438 a static icon. 0439 If this option is selected, the closing of the main window will not terminate &kbackup;. 0440 The application must be explicitly terminated by selecting the <guimenuitem>Quit</guimenuitem> action. 0441 Via the context menu of the &kbackup; system tray icon you can start and cancel a backup operation - 0442 which is the same as you can do in the main window. 0443 The tooltip on this icon also gives progress information (Number of saved files, size of the backup and 0444 the last saved file). 0445 </action></para></listitem> 0446 </varlistentry> 0447 0448 <varlistentry> 0449 <term><menuchoice> 0450 <guimenu>Settings</guimenu> 0451 <guimenuitem>Enable All Messages</guimenuitem> 0452 </menuchoice></term> 0453 <listitem><para><action> 0454 Activating this entry clears all internally stored <guilabel>Do not ask again</guilabel> flags for 0455 the dialogs shown in &kbackup;. 0456 </action></para></listitem> 0457 </varlistentry> 0458 0459 <varlistentry> 0460 <term><menuchoice> 0461 <guimenu>Settings</guimenu> 0462 <guimenuitem>Show Hidden Files</guimenuitem> 0463 </menuchoice></term> 0464 <listitem><para><action>Enable or disable</action> the display of hidden files (preceded 0465 by a dot character) in the tree view. Use this option if you want to exclude some 0466 hidden files from the backup. If you want to exclude all hidden files, 0467 use a filename filter in the profile settings. 0468 </para></listitem> 0469 </varlistentry> 0470 0471 </variablelist> 0472 </para> 0473 </sect2> 0474 0475 <sect2 id="help-menu1"> 0476 <title>The Help Menu</title> 0477 <para> 0478 &kbackup; has the common &kde; <guimenu>Help</guimenu> menu item, for more information read the section 0479 about the <ulink url="help:/fundamentals/menus.html#menus-help">Help Menu</ulink> of the &kde; Fundamentals. 0480 </para> 0481 </sect2> 0482 0483 </sect1> 0484 </chapter> 0485 0486 <chapter id="developers"> 0487 <title>Developer's Guide to &kbackup;</title> 0488 0489 <para> 0490 &kbackup; can be extended by using a shell script (or any other executable) 0491 which will be started at three different points during the backup process. 0492 The idea behind it is to allow to mount, unmount, eject media in a system 0493 specific way, or do other things with the produced archive files. 0494 </para> 0495 0496 <para> 0497 The script to execute must be given with the <option>--script</option> command line option. 0498 </para> 0499 0500 <para>Here is a sample script:</para> 0501 0502 <example><title>sliceScript.sh</title> 0503 <programlisting> 0504 #!/bin/sh 0505 0506 mode=$1 0507 archive=$2 0508 target=$3 0509 mountPoint=$4 0510 0511 case "$mode" in 0512 "slice_init" ) 0513 if [ "$mountPoint" != "" ] 0514 then 0515 mount /media/zip 0516 rm -f /media/zip/backup_2*.tar* 0517 fi 0518 ;; 0519 0520 "slice_closed" ) 0521 ;; 0522 0523 "slice_finished" ) 0524 if [ "$mountPoint" != "" ] 0525 then 0526 umount /media/zip 0527 eject /media/zip 0528 fi 0529 ;; 0530 esac 0531 </programlisting> 0532 </example> 0533 0534 <para> 0535 The script is always invoked with four command line arguments: 0536 </para> 0537 <itemizedlist> 0538 <listitem><para>invocation mode</para> </listitem> 0539 <listitem><para>archive (slice) file name</para> </listitem> 0540 <listitem><para>target directory/&URL;</para> </listitem> 0541 <listitem><para>mountpoint of the target directory if it's a local directory, else an empty string</para> </listitem> 0542 </itemizedlist> 0543 0544 <para> 0545 There are three possible invocation modes: 0546 </para> 0547 0548 <para> 0549 <itemizedlist> 0550 0551 <listitem><para>slice_init</para> 0552 <para>called before a new archive slice is being created on disc</para> 0553 </listitem> 0554 0555 <listitem><para>slice_closed</para> 0556 <para>called after an archive slice has been created, but before it has been put into 0557 the target directory</para> 0558 <para> 0559 This can be used if you want to copy the archive slice to some additional place, ⪚ 0560 the archive is sent to the main server (via a target &URL;), but you want to keep the last 0561 backup also onto the local disc. 0562 </para> 0563 </listitem> 0564 0565 <listitem><para>slice_finished</para> 0566 <para>called after an archive slice has been successfully transferred into the 0567 target directory</para> 0568 </listitem> 0569 0570 </itemizedlist> 0571 </para> 0572 0573 </chapter> 0574 0575 <chapter id="credits"> 0576 0577 <title>Credits and License</title> 0578 0579 <para> 0580 &kbackup; 0581 </para> 0582 <para> 0583 Program copyright © 2006 - 2009 Martin Koller <email>kollix@aon.at</email><!--FIXME use entities when kbackup depends on kdoctools >= 5.42--> 0584 </para> 0585 0586 <para> 0587 Documentation Copyright © 2006 - 2009 Martin Koller 0588 </para> 0589 0590 <!-- TRANS:CREDIT_FOR_TRANSLATORS --> 0591 0592 &underFDL; <!-- FDL: do not remove --> 0593 0594 &underGPL; <!-- GPL License --> 0595 0596 </chapter> 0597 0598 &documentation.index; 0599 </book> 0600 0601 <!-- 0602 Local Variables: 0603 mode: xml 0604 sgml-minimize-attributes:nil 0605 sgml-general-insert-case:lower 0606 sgml-indent-step:0 0607 sgml-indent-data:nil 0608 End: 0609 0610 vim:tabstop=2:shiftwidth=2:expandtab 0611 kate: space-indent on; indent-width 2; tab-width 2; indent-mode none; 0612 -->