- Now head to your Proxmox server and connect to it ideally via SSH to run the following commands. If you do not have rclone installed installer, run:
apt-get install rclone -y
rclone version
- If you geta version on 1.5x, then rclone authentication during config will not work and a manual upgrade of rclone is required first. Run the following (assuming you are connected to Proxmox’s terminal as a root):
-v ; curl https://rclone.org/install.sh | bash
rclone version
- Then start the rclone config process (as per rclone’s GCP documentation):
rclone config
n
for New Remote- Name it – such as proxmox-gcp
- Choose
Google Cloud Storage
(option number 16 but that can change in newer versions of rclone). client_id
—> skip, press enterclient_secret
—>skip, press enterproject-number
—> Find out in the ‘Project Settings’ section in GCPuser_project
—> skip, press enterservice_account_file
—> skip, press enteranonymous
—> we want false, so press enterobject_acl
—> we only want the owner to get access, so press enter or choose 4bucket_acl
—> we want the private option (option 2)bucket_policy_only
—> leave default (press enter)location
—> select the location in which you created the bucketstorage_class
—> choose you storage tier that you selected during the bucket creation process, such asArchive
(option 6)env_auth
—> press 1 and enterEdit advance config
? —> type n and press enterUse Web Browser to authenticate rclone
—> type n and press enterUse advanced config?
—> type n and press enter- Now you will need to download rclone on your actual personal computer (or a remote server with a browser) and open terminal there. Let’s say you are running Windows, then:
- Download the package from rclone
- Unpack the zip file somewhere easy to find (such as
C:\temp\rclone
) - Open the command line or PowerShell and run the cd commands to get there (such as ‘
cd C:\temp\rclone’
). - Test that rclone works by running
'rclone version
‘. - Copy paste the command supplied by your proxmox server, it starts with ‘rclone authorize’ . Your browser will open to complete the authentication. Once done, the browser window can be closed – check your terminal window that will read ‘Paste the following into your remote machine –→’.
- Copy paste the token and paste it into Proxmox to complete the process.
- Lastly, confirm the ‘
Is it okay?
’ prompt.
- Now you can verify that the GCP bucket is accessible:
- Run ‘
rclone lsd remotename:bucketname
’, e.g. ‘rclone lsd proxmox-gcp:proxmox-backup-bachelor
’ . It should show nothing as the bucket was just created and is empty (lsd = list directories). - Run a ‘
touch /tmp/test.txt
’ and then try copying a file to it such as ‘rclone --gcs-bucket-policy-only copy /tmp/test.txt proxmox-gcp:proxmox-backup-bachelor
’ (the output should, again, be nothing). - Then run ‘
rclone ls proxmox-gcp:proxmox-backup-bachelor
’ to view that the file is on it. You should see the file listed. - Lastly, let’s delete the file to verify that we have delete permissions on the buckets’ objects, too. Run ‘
rclone --gcs-bucket-policy-only delete proxmox-gcp:proxmox-backup-bachelor/test.txt’
.
- Run ‘
Great, now you can upload / download / delete files to / from your bucket, so we can proceed with mounting it automatically on reboot.