zoneoffline.blogg.se

Backblaze b2 file copy script for mac
Backblaze b2 file copy script for mac












backblaze b2 file copy script for mac
  1. #Backblaze b2 file copy script for mac install#
  2. #Backblaze b2 file copy script for mac download#

Now, b2 authorize-account, and enter the account id and account secret.

#Backblaze b2 file copy script for mac install#

  • Now, first install pip through sudo apt install python-pip and then b2 through pip install b2.
  • #Backblaze b2 file copy script for mac download#

    Follow the instructions in cookies.txt to download the copied link using cookies.Now, make sure to cd into your mounted volume and execute curl, wget or aria2c whatever’s your favourite.

    backblaze b2 file copy script for mac

  • Now login to your new droplet and create a new text file ‘cookies.txt’ and paste the content and save it.
  • Click the extension icon in backblaze page and copy the contents.
  • If you are using chrome, install this extension called: cookies.txt.
  • Once the download starts, just cancel it, copy the link.
  • Login to your backblaze account, go to My Restores, and click on the download link.
  • Spin up a droplet in SF area, (since Backblaze’s datacenter is nearer) with attached value of capacity more than twice the size of your backup.
  • Wait for the restore, takes hours to prepare the zip.
  • Login to Backblaze, request a restore, select all files.
  • backblaze b2 file copy script for mac

    I basically needed backblaze for archival purpose. I realized that I can move this to B2 and save a lot of money. When you want to format your machine and get a clean slate, it helps to have a backup of all your information in cloud (only if you have no trust issues with “cloud”).Īnyway, I have had a backup of about 90GB with backblaze for an year. # If /media/external/CloudDATA is not your data directory, modify the -excludeRegex flag accordingly, which excludes the NC cache from getting synced to B2.ī2 sync -excludeRegex '\/media\/external\/CloudDATA\/cache\/.Backblaze Personal Backup is great. This will take a while if you added much data since your last backup. # NextCloud will be unavailable during the sync. # Sync data to B2, then disable maintenance mode Mysqldump -single-transaction -h $db_host -u $db_user -p $db_pass $db_name > nextcloud.sqlī2 upload_file $b2_bucket nextcloud.sql NextCloudDB/nextcloud.sql Sudo -u www-data php $nextcloud_dir/occ maintenance:mode -on # This ensures consistency between the database and data directory. # Save, quit and check that the crontab has been installed using the following command.Įcho "This script must be run as root " 1>&2 # 0 2 * * sat root sh /srv/backupToB2.sh > /srv/backupToB2.log # Add the following line to the crontab to conduct a weekly backup every Saturday at 2:00am. Set up a cron job to run this backup on a predefined schedule (optional). Save this script to a safe directory such as /srv/backupToB2.sh and make it executable with the following command. Authenticate your CLI using the b2 authorize_account command. Create a bucket and obtain your Account ID and Application Key from your B2 account. # 'cache_path' => '/media/external/CloudDATA/cache', # If /media/external/CloudDATA is not your data directory, substitute the relevant directory before /cache. Insert the following line in your NextCloud config.php file above the ) to move the cache above each user's data directory. # - BackBlaze B2 CLI installed from PyPI - sudo pip install b2 # - Python 3.x and Python PIP - sudo apt-get install python3 & wget & sudo python3 get-pip.py # - BackBlaze B2 account (10 GB Free) - Create one at # Uploads are free, and storage costs only $0.005/GB/month compared to S3's $0.022/GB/month. # BackBlaze B2 is an object storage service that is much less expensive than using Amazon S3 for the same purpose, with similar versioning and lifecycle management features. # This script creates an incremental backup of your NextCloud instance at BackBlaze's off-site location. # NextCloud to BackBlaze B2 Backup Script














    Backblaze b2 file copy script for mac