1/18/2024 0 Comments Rclone raspberry pi b2 backblaze![]() Make sure to read Borg docs on a proper passphrase. # File that stores the Borg passphrase for encryption. Passed into the docker container as a volume mount.īorgConfigDir=/mnt/user/borg/backup/config Config directory should not be inside the dir tree to be backed up. # Directory that will hold the Borg passphrase file, exclude file, etc. # Comment out dockerNameBorgKeyExport if you don't want to dump the repo key to the log file. List the files in the Borg archive created in Step 3. ![]() Creates a Borg archive from backupSource location.Optionally dumps the Borg repokey to the log file.If Borg repo already exists, script continues to next step. Creates an encrypted Borg repo at the location defined by borgRepoDir. ![]() Make sure to adjust the script variables at the top of the script. Create Borg user script:Īdd the below script as a user script in the CA User Scripts plugin. Īt this point you will have a Docker image named "borg-image" on your Unraid system. Use the following Dockerfile to create the image on your Unraid system:īuild Docker image: docker build -t borg-image. Instead of downloading some random Borg Docker image, I chose to create my own image from the Borg repo. There is no official Docker image provided by the Borg team. Instead of installing Borg and Rclone on the Unraid system, these scripts use Docker containers to do the backups. Just use the newly generated key.Here are a couple scripts to backup an Unraid directory/share to Backblaze B2 using Borg and Rclone. Now store the original key in a password manager and never save it otherwise or use it. What you can do is install the b2 command line tool (1st party) and then do the following export B2_APPLICATION_KEY_ID=ī2 create-key safe listKeys,listAllBucketNames,listBuckets,readBuckets,writeBuckets,readBucketRetentions,writeBucketRetentions,readBucketEncryption,writeBucketEncryption,listFiles,readFiles,shareFiles,writeFiles,readFileLegalHolds,writeFileLegalHolds,readFileRetentions,writeFileRetentions What you can do is (a) generate a key that never allows for a real delete and (b) set up lifecycle rules so that things stick around for a day or two. You cannot use B2's "object-lock" because it'll break the flow. You are protected with security through obscurity but that is a bad design. That means that in curr will be the latest and greatest look of your entire backup and in dated back directories, you will have all of the files that would have been deleted or modified. What you will have is a "reverse incremental" backup. Make that into backup.sh then do $ chmod +x backup.sh ![]() exclude "*.exe" `# Plus any other excludes` \ fast-list `# useful on bucket-remotes like B2` \ Make a simple script that looks like the following NOW=$(date +"%Y-%m-%dT%H%M%S%z") If you need more info: $ rclone lsf -R $HOME -exclude "*.exe" This is a good test since it will help you identify issues and make sure you're getting all of the files you want. Let's also say you are backing up $HOME $ rclone size $HOME -exclude "*.exe" You can test what you have backed up pretty easily. If you don't want to mess with it, just leave it alone. You can just copy everything or you can use filters to control it. You will use rclone to copy from a source "remote" (which will be your local file system) to B2. See later for ransomware protection guide too Step 2: Set up filters, etc. Read the 1001 different guides out there including the ones written by Backblaze on their blog. Meaning if you don't use rclone's encryption, you can download your files with any other B2 compatible tool including the web interface. Also, especially useful for the novice user, it uploads your files in a 1-1 manner. What it is is easy, robust, and sufficient. Is it is the smartest, best, most efficient, most featureful, fastest backup tool out there? Nope for every single one of them. I could have small typos that make it fail but I can update it. WARNING: I am writing this without access to an easy test. This is not going to go into every single detail. This is really for /u/TroothBeToldPodcast who is having some trouble, and /u/TotallynotJohnSmith, but maybe it will help others.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |