.\" Automatically generated by Pandoc 2.19.2 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "devsync" "1" "August, 2022" "" "" .hy .SH NAME .PP devsync \[en] Object driven synchronization/backup tool for developers. .SH SYNOPSIS .PP \f[B]devsync\f[R] [\f[B]options\f[R]] .SH GENERAL DESCRIPTION .PP \f[B]devsync\f[R] is a backup and synchronization tool with focus on developers directories. It recognizes several specific directory types and adjust the backup strategy accordingly. So \f[B]devsync\f[R] will not do a by-file backup but try to do clever backups of only those files or data which is necessary to restore the original content. The rationale is to save storage space and speed up the backup process. .SH SESSION AND LOG FILES .PP \f[B]devsync\f[R] will create a `.devsync.session' session file in the target directory which saves all current options about the sync session. If started in a directory with session file all options are read from there if none is given otherwise the session file is updated. .PP \f[B]devsync\f[R] will create a `.devsync.log log' file in the target directory which log entries for runtime errors as well as for each skipped directory. The logs are dropped when a new session is started. .SH TERMINAL UI .PP \f[B]devsync\f[R] can provide a simple terminal interface when started with `-u'. The ui has a progress bar and also shows you the backup jobs that are currently running and all runtime issues that happened along the way. .PP It will remain active when the backup process has been completed and waits for a press on `q' or `Q' to terminate. .PP Once the backup process is complete you can navigate through the runtime log with the up/down and page-up/page-down keys. .SH GENERAL OPTIONS .TP \f[B]-h\f[R], \f[B]--help\f[R] Display usage hints. .TP \f[B]-s\f[R], \f[B]--source\f[R] DIR Source directory where to start backup. .TP \f[B]-t\f[R], \f[B]--target\f[R] DIR Target directory to backup into. .TP \f[B]-d\f[R], \f[B]--delete\f[R] Remove extraneous files and directories. .TP \f[B]-a\f[R], \f[B]--archive\f[R] Preserve timestamps, permissions and ownership. .TP \f[B]-o\f[R], \f[B]--owned\f[R] Backup only files and directories that are owned by us. .TP \f[B]-u\f[R], \f[B]--ui\f[R] Show terminal UI. .TP \f[B]-i\f[R], \f[B]--ignore\f[R] PATH,PATH,\&... Comma separated list of file/directory names to ignore, the values are matched with `ends_with()'. .TP \f[B]-j\f[R], \f[B]--jobs\f[R] NUM Number of concurrent sync/backup jobs. This defaults to 10 and is extremly helpful with flash drivers but may reduce performance on hard drives. .SH DIRECTORY CATEGORY `SPECIAL': .SS Yocto .PP Yocto directories are identified by the existence of directories `bitbake', `scripts' and something starting with `meta'. Once a Yocto directory has been detected the subdirectories are not scanned for new types. .TP \f[B]--yocto-ignore\f[R] Do not backup Yocto directories. .TP \f[B]--yocto-downloads-sync\f[R] Backup the `downloads' directory, by default this is ignored. .TP \f[B]--yocto-build-sync\f[R] Backup the build directories `build' or `BUILD', `cache', sstate-cache\[cq] and `buildhistory'. .SS Sysroot .PP Sysroot directories are identified by the existence of directories `dev', `usr', `var' and `bin'. By default they are ignored. Once a sysroot directory has been detected the subdirectories are not scanned for new types. .TP \f[B]--sysroot-sync\f[R] Enable backup for sysroot directories. .SH DIRECTORY CATEGORY `BUILD': .SS Cargo .PP Cargo build directories are identified by the file `CACHEDIR.TAG'. By default they are completely ignored. .TP \f[B]--cargo-sync\f[R] Backup cargo build directories. .SS CMake .PP CMake build directories are identified by the file `CMakeCache.txt'. By default they are completely ignored. .TP \f[B]--cmake-sync\f[R] Backup CMake build directories. .SS Flutter .PP Flutter build directories are identified by a file ending with `.cache.dill.track.dill'. By default they are completely ignored. .TP \f[B]--flutter-sync\f[R] Backup Flutter build directories. .SS Meson .PP Meson build directories are identified by the files `meson-info', `meson-logs' and `meson-private'. By default they are completely ignored. .TP \f[B]--meson-sync\f[R] Backup Meson build directories. .SS Ninja .PP Ninja build directories are identified by the file `build.ninja'. By default they are completely ignored. .TP \f[B]--ninja-sync\f[R] Backup Ninja build directories. .SH DIRECTORY CATEGORY `REPOSITORY': .SS Subversion .PP Subversion directories are identified by the directory `.svn'. By default SVN directories are fully synced and subdirectories are scanned for other categories. .TP \f[B]--svn-ignore\f[R] Ignore SVN directories. .TP \f[B]--svn-full\f[R] Do a full sync - treat repository like a plain directory and rescan subdirectories e. g. for build directories. .TP \f[B]--svn-ignore-unversioned\f[R] Do not backup unversioned files. .TP \f[B]--svn-ignore-modified\f[R] Do not backup modified files. .SS Git .PP Git repositories are identified by the directory `.git'. By default a git repository is synced by checking for stashes which are saved in the target directory `stashes', for untracked files which are saved in the target directory `untracked' and for unstaged files which are saved in the target directory `unstaged'. .PD 0 .P .PD Then \f[B]devsync\f[R] scans all local branches and if one of them does not have a matching upstream branch the repository is cloned `bare' into the subdirectory `repo'. .PD 0 .P .PD For git repositories the \f[B]-d\f[R] flag is ignored, old content is always removed. .TP \f[B]--git-ignore\f[R] Ignore git directories. .TP \f[B]--git-full\f[R] Do a full sync - treat repository like a plain directory and rescan subdirectories e. g. for build directories. .TP \f[B]--git-ignore-stashes\f[R] Do not backup stashes. .TP \f[B]--git-ignore-unstaged\f[R] Do not backup unstaged files. .TP \f[B]--git-ignore-untracked\f[R] Do not backup untracked files. .TP \f[B]--git-ignore-unpushed\f[R] Do not clone bare repository if upstream branches to not match local branches. .SS Plain - Simple .PP The default handler. No options, it simply sync all files and directories but keeps scanning for other categories when processing subdirectories. .SH ENVIRONMENT .PP You can enable log output (only makes sense if \f[B]-u\f[R] is not set) using RUST_LOG environment variable. .SH REPORTING BUGS .PP Bugs can be reported on .SH LICENSE .PP GNU GPL version 3 or later . .SH COPYRIGHT .PP Copyright \[co] 2022 Jochen Henneberg. .SH AUTHORS Jochen Henneberg (jh\[at]henneberg-systemdesign.com).