A Python CLI tool to create and execute filesystem backups
- Install Python 3.11 or higher.
git clone git@github.com:colinbr96/crb-backup.gitcd crb-backup/python3 crbbackup.py profile add- Enter a profile name and a destination folder. The destination is where the backup zip files will be created.
- Edit the profile JSON file to add a list of
sources. These are the folders that will be backed up. Feel free to use glob patterns to only match certain types of files/folders.
Example profile file:
{
"version": 1,
"name": "my-backup",
"sources": [
"C:/Users/Colin/Saved Games/",
"D:/Documents/**/*.pdf",
"D:/Documents/**/*.docx"
],
"destination": "G:/Google Drive/Backups/CRB Backup/"
}Example: python3 crbbackup.py profile add
- Creates a new profile using interactive prompts.
Example: python3 crbbackup.py backup --profile <profile>
- Reads the configuration profile and copies all input files to the specified destination.
- The profile file is included in the backup archive.
- To see a list of all files as they are backed up, use
crbbackup.py --verboseor-vv - To output a CSV with a list of all backed-up files, use
--output-csv
Example: python3 crbbackup.py restore --file <file> --overwrite <y,n,ask>
- Reads the backup zip file and restores the files to their original location.
- Also restores the profile if it is missing.
- You can only create full backups. Incremental & differential backups are not supported.