| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Codeberg link syncBKUP - Download from Codeberg. Codeberg is very similar to GitHub, both are built on Git.
NOTE: syncBKUP is best used with local attached storage, it is not recommended to use networked attached storage belonging to another Linux computer. The repository backups are individual files and directories that are mirrors of the source data, when copied to another computer there is the potential for file and directory ownership and attribute conflicts. To avoid these conflicts a backup in the repository needs to be bundled into a single file before being copied to another Linux computer.
syncBKUP -s <source> -d <destination> -m <no-mount-check>
-s The source data of the backup, the source must be a directory or the name of a file that contains directories to be backed up.
-d The destination directory of the backup data, the backup repository. The repository contains the backed up data, logs and the delta versions.
-m An option that disables the mount point check for the backup target storage. When used it must be accompanied by "no-mount-check".
Input notes and restrictions for all backups
Source File Format A source file that provides a list of directories to back up.
The format requirements of the source file are:
Mount Point Check A safety check to prevent the potential of the root and other filesystems filling up.
Traditionally /mnt is where temporary external devices and network shares are attached. Prior to attaching (aka mounting) a device a directory (aka mount point) must exist. Anything that copies data to that mount point directory without an attached device will run as normal and could fill up the filesystem. When the mount point has an attached storage device, any data that was previously written to it remains and it is hidden and using up storage capacity.
Disabling Mount Point Check : The option -m must be accompanied with no-mount-check : -m no_mount_check
The backup repository contains the most recent full backup in its unmodified native format, any file or directory copying utility can be used to recover data, that includes the desktop GUI point-and-click. From the command line same method can be be used to recover historical data from the version directories. See RSYNC- Options used section below and the internet for more information on which attributes are preserved in copying data.
rsync -aAXhv <source> <destination>
Note: Trailing slashes at the end of the source path indicates that only the contents of the directory will be copied, omitting the slash means the entire directory, including its name, will be copied.
Directory structure of the backup repository:
The top level (Level 1) has to be a pre-existing directory. SyncBKUP will automatically create directories for Levels 2 to 4 when required.
How to identify and locate what is backed up
Examples
Computer name = star03 Data source = -s /home/ada/music/2010s/dubstep Destination = -d /mnt/USB/BKUP_2TB/syncBKUP/2025 Location of the backup: .../syncBKUP/2025/star03/home_ada_music_2010s_dubstep/dubstep/<backup data>
Computer name = fred02 Data source = -s '/mnt/c/Users/ted/Music/1990 - 97/Shoegaze and Nu Metal' Destination = -d /mnt/e/syncBKUP/ Location of the backup: '.../syncBKUP/fred02/mnt_c_Users_ted_Music_1900 - 97_Shoegaze & Nu Metal/Shoegaze & Nu Metal/<backup data>'
Example of version directories
Computer name = star03
Data source = -s /home/ada/
Destination = -d /mnt/USB/BKUP_2TB/syncBKUP/2025
Backup path = .../syncBKUP/2025/star03/home_ada/ada/
Directories created by syncBKUP for the backup of star03:/home/ada/
.../star03/home_ada
|__ /ada <------------------------- Contains the most recent synchronised full backup of /home/ada
|__ /ada-version-2025-Nov-23-1902-16
|__ /ada-version-2025-Nov-09-1900-10 Version directories containing all the modificatons and deletions
|__ /ada-version-2025-Nov-02-1901-36 from each backup run (every Sunday at about 7PM).
|__ /ada-version-2025-Oct-26-1900-05
|__ /log <------------------------ The log file for every /home/ada backup.
All log data is appended to this file.
Running the script produces considerable output informing the user of failures and successes of backups. The user can record this information by directing to a log file.
syncBKUP -s <source> -d <destination> > log_file OR syncBKUP -s <source> -d <destination> | tee log_file
Rsync was developed for use on *nix systems it was never intended for use on Windows file systems. Many advocate it is safe to use on Windows file systems but there are known issues with file permission and attributes when copying between Linux and Windows filesystems. I have seen rsync get the yips when synchronising data from WSL2-Linux to Windows attached USB storage. It pays to be vigilant and check for errors.
Running of syncBKUP on Microsoft WSL2 Linux and MSYS2 has different use cases.
Microsoft recommends that you do not run WSL2 on computers that run virtual hypervisors like VirtualBox, apparently there are conflicts between WSL2 and other virtual hypervisors. With computers that have VirtualBox or the like installed the safest option is to install MSYS2 to run syncBKUP.
RSYNC Options used
| RSYNC Options | Action |
|---|---|
| -a | Archive mode. |
| -A | Preserve ACLs. |
| -X | Preserve extended attributes. |
| -h | Human readable, for the logs. |
| -v | Verbosity. Set to lowest verbosity used in individual logs. |
| --backup | Backup all files and directories before they were changed, deleted or renamed. |
| --backup-dir | The directory for the backups of the previous option. |
| --no-links | Do not follow or use symbolic links. |
| --delete | At synchronisation, anything deleted on source is mirrored in the repository. Deleted files and directories saved in the version directories. |
| --log-file | This appends the output created by rsync and the -v option to a designated log file. |
Compression not used because it only of benefits IP network synchronisations. Rsync will not compress files that are already compressed (most multimedia) and small files.
Following symbolic links can lead you into strange places, like the Windows Documents folder which has hidden system links to the Videos, Pictures and Music folders. Following symbollic links can cause applications to enter into a circular path of links from which there is no escape.
Limitations - maximum Directory Path Length
Linux
MS Windows
Setting Windows directory path length
In Powershell (as administrator) run the Get-ItemProperty command to determine if the maximum is enabled.
PS C:\> Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" LongPathsEnabled : 0 <----------------------- 0 = not enabled otherwise its 1 = enabled PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control PSChildName : FileSystem PSDrive : HKLM PSProvider : Microsoft.PowerShell.Core\Registry
Use the New-ItemProperty command to set it. Once done, restart the computer for the change to take effect.
PS C:\> New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force LongPathsEnabled : 1 PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control PSChildName : FileSystem PSDrive : HKLM PSProvider : Microsoft.PowerShell.Core\Registry PS C:\>
Updates under construction
| Back | FazBrowse Home | New Git URL |