Cloudundancy is a cross-platform C++ command line program for quickly copying a configurable list of files and folders to a configurable list of destination folders to achieve cloud-redundant and device-redundant backups of files.
For example, on Windows in a Cloudundancy.ini file, destination folders can be configured to be automatic-cloud-uploading Google Drive and Microsoft OneDrive folders C:\GoogleDrive\CloudundancyBackups and C:\OneDrive\CloudundancyBackups. Double USB backups can also be achieved by adding USB drive paths such as E:\CloudundancyBackups and F:\CloudundancyBackups to a Cloudundancy.ini file.
On Linux, a Bash script can be written to run Google Drive command line drive push from ~/googledrive after having run Cloudundancy to copy files to ~/googledrive.
- Cloudundancy command line usage
- Cloudundancy program modes
- Cloudundancy code structure as it appears in Visual Studio Code on Linux
- Cloudundancy code structure as it appears in Visual Studio 2022 on Windows
- Linux Jenkins jobs which build and statically analyze Cloudundancy
- Windows Jenkins jobs which build and statically analyze Cloudundancy
- 4 steps to build binary cloudundancy on Linux with Clang
- 4 steps to build executable Cloudundancy.exe on Windows with Visual Studio 2022
- Thanks to
Cloudundancy v1.0.0
Copies configurable file and folder paths to configurable file and folder paths.
For example, on Windows, destination folder paths can be set to C:\GoogleDrive and C:\OneDrive
to achieve cloud-redundant backups by way of automatic cloud uploading.
Usage:
cloudundancy example-linux-ini-file
cloudundancy example-windows-ini-file
cloudundancy copy-files-to-multiple-folders
--ini-file=<FilePath> [--delete-destination-folders-first]
cloudundancy 7zip-files-then-copy-the-7zip-file-to-multiple-folders
--ini-file-to-copy-files-to-7zip-staging-folder=<FilePath>
--7zip-staging-folder=<FolderPath>
--ini-file-to-copy-7zip-file-from-staging-folder-to-multiple-folders=<FilePath>Program mode example-linux-ini-file prints an example Linux Cloudundancy .ini file which shows how to achieve triple backups of files to one GitHub repo folder and two USB drives:
Program mode example-windows-ini-file prints an example Windows Cloudundancy .ini file which shows how to achieve quintuple backups of files to two automatic cloud-uploading folders (C:\GoogleDrive and C:\OneDrive), one GitHub repo folder (C:\GitHubRepos), and two USB drives (D: and E:).
[DestinationFolders]
# Cloud-redundant backups to Google's cloud, Microsoft's cloud, and GitHub's cloud
C:\GoogleDrive\CloudundancyBackups
C:\OneDrive\CloudundancyBackups
C:\GitHubRepos\CloudundancyBackups
# Device-redundant backups to USB drive D: and USB drive E:
D:\CloudundancyBackups
E:\CloudundancyBackups
[SourceFilesAndFolders]
# In the [SourceFilesAndFolders] section, the line format is:
# SourceFileOrFolderPath -> RelativeDestinationFolderPath
# Critical files to backup
C:\CriticalFiles\KeePassFile.kdbx -> .
C:\CriticalFiles\PersonalFinancesSpreadsheet.xlsx -> .
C:\VS2022\Common7\IDE\VC\Snippets\1033\Visual C++\C++Snippets.snippet -> Snippets
C:\VS2022\Common7\IDE\Extensions\Microsoft\Python\Core\Snippets\1033\Python\PythonSnippets.snippet -> Snippets
C:\VS2022\VC#\Snippets\1033\Visual C#\CSharpSnippets.snippet -> Snippets
# Critical folders to backup
# Source folder paths ending in a '\' or '/' character are interpretted as folders instead of files
C:\Users\UserName\Documents\WindowsPowerShell\ -> PowerShell
[FileSubpathsToNotCopy]
# In the [FileSubpathsToNotCopy] section, case-sensitive file path substrings can be listed one per line
# PowerShell Modules folder to not backup because PowerShell modules can be easily reinstalled
PowerShell\Modules\
cloudundancy copy-files-to-multiple-folders
--ini-file=<CloudundancyIniFilePath> [--delete-destination-folders-first]Program mode copy-files-to-multiple-folders copies files and folders listed in a Cloudundancy.ini file to multiple destination folders.
Most notably, destination folders can be configured to automatic cloud-uploading Google Drive and Microsoft OneDrive folders on Windows for achieving cloud-redundant file backups.
Console output on Linux for cloudundancy copy-files-to-multiple-folders --ini-file=/code/dotfiles/LinuxCloudundancy.ini --delete-destination-folders-first:
As an example on Windows, imagine the following folder structure at C:\CloudundancyTesting:
With Cloudundancy.ini being as follows to instruct Cloudundancy to backup business-critical files and folders present in C:\CloudundancyTesting, except for file paths containing case-sensitive substrings ignored_filename or .ignored_file_extension:
Console output for Cloudundancy.exe copy-files-to-multiple-folders --ini-file=C:\CloudundancyTesting\Cloudundancy.ini --delete-destination-folders-first:
Resulting contents of C:\CloudundancyTesting\GoogleDrive:
Resulting contents of C:\CloudundancyTesting\OneDrive:
Resulting contents of C:\CloudundancyTesting\GoogleDrive\Cloudundancy.log:
Resulting contents of C:\CloudundancyTesting\OneDrive\Cloudundancy.log:
cloudundancy 7zip-files-then-copy-the-7zip-file-to-multiple-folders
--ini-file-to-copy-files-to-7zip-staging-folder=<CloudundancyIniFilePath>
--7zip-staging-folder=<FolderPath>
--ini-file-to-copy-7zip-file-from-staging-folder-to-multiple-folders=<CloudundancyIniFilePath>Program mode 7zip-files-then-copy-the-7zip-file-to-multiple-folders performs the following steps to backup files to a .7z file and then copy the .7z file to multiple destination folders:
- Deletes the 7-Zip staging folder specified with
--7zip-staging-folder. - Copies
[SourceFilesAndFolders]listed in Cloudundancy.ini file--ini-file-to-copy-files-to-7zip-staging-folderto the 7-Zip staging folder.
Example --ini-file-to-copy-files-to-7zip-staging-folder:
- Runs executable
7zon the PATH to 7-Zip the contents of--7zip-staging-folderto a .7z file written to folder<7ZipStagingFolder>\7ZipFilewith file nameCloudundancyBackup_YYYY-MM-DDTHH-MM-SS.7z. - Copies the
.7zfile to[DestinationFolders]listed in Cloudundancy.ini file--ini-file-to-copy-7zip-file-from-staging-folder-to-multiple-folders.
Example --ini-file-to-copy-7zip-file-from-staging-folder-to-multiple-folders:
As an example, consider the following folder structure:
Console output on Windows for the following Cloudundancy 7-zip command line:
Cloudundancy.exe 7zip-files-then-copy-the-7zip-file-to-multiple-folders
--ini-file-to-copy-files-to-7zip-staging-folder=C:\Cloudundancy7ZipTesting\CodeFolderTo7ZipStagingFolderCopyingStep.ini
--7zip-staging-folder=C:\Cloudundancy7ZipTesting\7ZipStagingFolder
--ini-file-to-copy-7zip-file-from-staging-folder-to-multiple-folders=C:\Cloudundancy7ZipTesting\7ZipFileToGoogleDriveAndOneDriveCopyingStep.iniGitHub repos successfully 7-Zipped and copied to a Google Drive folder:
GitHub repos successfully 7-Zipped and copied to a OneDrive folder:
git clone https://github.com/NeilJustice/Cloudundancy
cd Cloudundancy && mkdir Release && cd Release
CXX=clang++ cmake .. -DCMAKE_BUILD_TYPE=Release
sudo cmake --build . --target installResulting binary /usr/local/bin/cloudundancy:
git clone https://github.com/NeilJustice/Cloudundancy
cd Cloudundancy
cmake . -G"Visual Studio 17 2022" -A x64 -DCMAKE_INSTALL_PREFIX=C:\bin
cmake --build . --config Release --target installResulting executable C:\bin\Cloudundancy.exe:
brandmark.io for Cloudundancy's logo
























