首页 > 代码库 > Backup and synchronize LibreOffice configurations using rsync

Backup and synchronize LibreOffice configurations using rsync

<style></style>

When using rsync to backup and synchronize configuration files, do remember to close all LibreOffice sessions including the Quick Starter.

However, even by closing all the sessions, it still cannot ensure a safe and reliable configuration backup. For example, it has made all the extensions fail to work on my home PC after such a backup based on the configuration files on company‘s PC. Therefore, we should only backup some of the configuration files instead of all of them by using --exclude command line options in rsync asfollows:

system("rsync -rtvz --update --delete --exclude=\"/registrymodifications.xcu\" --exclude=\"/backup\" --exclude=\"/extensions\" --exclude=\"store\" --exclude=\"temp\" --exclude=\"TexMaths\" --exclude=\"uno_packages\" /cygdrive/c/Users/CNJITIA1/AppData/Roaming/LibreOffice/4/user/ /cygdrive/d/administrator/Documents/computer/office-typesetting/libreoffice4-config-backup/");