Download (,) you can't pay or how I made a backup of data from the cloud
Introduction
The problem of space
There are some photos and videos in Google Photos or Yandex Disk (list of supported providers in this guide) and the space in the cloud gradually runs out, especially if you shoot a lot of content in 4K or actively take pictures.
From the moment you start running out of space in the cloud, you have, as they say, 2 options:
Buy additional cloud space and continue uploading your data to the cloud.
Pros: absolutely all data in the cloud is available to you at any time if you have internet.
Cons: Over time, more and more space will be needed, which means that space in the cloud will need to be constantly purchased.Upload everything you have in the cloud to your local hard drive, delete everything from the cloud and start filling up the free space again.
Pros: You always pay the same amount for a fixed cloud size.
Cons: if you download all the data from the cloud every, say, two years, then while using the cloud, you will only have access to data for the last 2 years, and not for the entire period.
For me, seeing only the photos and videos I took in the last 2-3 years was not critical. Therefore, it was decided to continue using my Google cloud of 200 GB.
So, I chose the second option with creating a data backup every 2-3 years.
I also made this decision because I would have to back up my data from the cloud sooner or later anyway. I would have reached the 1TB mark eventually anyway and would have to do something about it.
File size problem
Google Photos has the ability to view files that take up a lot of space. For me, these were short 4K videos of me traveling around different countries, doing sports, or taking pictures of parks and streets. Many of these videos are unnecessarily large and could be 10 times smaller if I shot them in 1080p 60 fps. Why store a 30-second 4K video that is 400 MB in size when you can store it in 1080p 60 fps, which is 65 MB?
And again, from the moment you have a lot of 4K videos in the cloud, you have 2 options:
Delete 4K videos and free up cloud space.
Pros: you made room
Cons: you lost your memoriesDownload these videos to your PC, convert 4K to 1080p 60fps and upload back to the cloud.
Pros: You've saved your memories and also freed up space in the cloud.
Cons: your videos are now in 1080p 60fps (for me this was not a problem).
So we have 2 problems:
Potential solutions to the problems described
The first thought that came to my mind was this order of actions:
To free up space in the cloud:
Go to Google Photos;
Select all 14,000 photos and videos (in Google Photos this is not done in one click, and you can easily budget an hour of work for this);
Download all photos and videos to a local disk (everything is downloaded as an archive in the browser);
Unzip the archive;
Sort all 14,000 files by dates or events (this is already quite a big and tedious job);
Delete all photos and videos from the cloud, start filling the cloud again;
And so every two years.
Sounds like a hell of a job!
For large 4K videos:
Go to Google Photos;
Sort all videos by size;
Download large 4K videos;
Open these videos in Movavi Video Editor Plus;
Convert 4K to 1080p 60fps;
Upload back to the cloud.
I was not at all happy with the fact that I had to invest quite a lot of time in this whole process. The main thing is that this process will be regular, which is even more frightening.
There was a need to come up with an elegant solution to get this whole process on track.
A real solution to the problems described
As you probably already understood, there is no native tool for downloading all data from the cloud. That is, you cannot go to Google Photos and quickly download all the files to your local disk.
Imagine how convenient it would be if you could go to Google Photos, click the Download button, all the photos are downloaded to your local drive, and also sorted by year, month and even day. You don’t have to work with archives or sort files manually. You could also download all 4K videos and convert them to 1080p 60 fps without launching any video editors.
My little research has allowed me to find a solution that addresses these issues exactly as described above.
You will need 2 tools:
ffmpeg (ffmpeg-release-full variant).
Using this program we will convert 4K video to 1080p 60fps without video editors.
Rclone (select the option that matches your system).
With the help of this program we will download all photos and videos from the cloud with automatic sorting of photos and videos by year, month or day.
Converting video using FFMPEG
The order of settings before using ffmpeg:
Select the local disk where you want to store the downloaded ffmpeg program files;
Create a folder on your local disk (the name should not contain Cyrillic);
Transfer there all the contents of the archive that you downloaded from the ffmpeg website.
Now we need to let the system know where we have inserted the executable files, so that the system will contact there every time we request it and run ffmpeg.
To do this:
Copy the path where you pasted the files from the archive, as shown in the screenshot:
For the English version of Windows, you need to go to:
Start > Search > Edit the system environment variables > Advanced > Environment Variables.
For the Russian version of Windows, you need to go to:
Start > Search > Edit the system environment variables > Advanced > Environment Variables.In the window that opens, you should find the lines with the Path variable and click Edit as shown in the screenshot below:
In the window that opens, it's time to create a new variable. Remember, you copied the path where our ffmpeg program is located? Click the New button and create a new variable by pasting the path you copied there, and click Ok.
In the remaining windows, also click OK everywhere.
If you did everything correctly, then congratulations, you just configured ffmpeg and can convert videos!
Checking ffmpeg functionality
There is one caveat to using these programs – you have to work with them through the terminal. Personally, I find this a plus, because these programs have flexible commands that can be easily customized and executed using scripts, which is what we will do next. I will add all the scripts that I use myself, and you can test them in your own scenarios. In the scripts, you can find annotations to the code, which will help you understand what exactly this or that line of code does.
To test ffmpeg:
Launch Windows Terminal. Start > Search > Terminal
In the terminal, write a simple command ffmpeg
If you did everything correctly and the system saw the program at the path you specified in the variables, then you will see the following response:
This means you can run a script that will run ffmpeg and convert your 4K videos to 1080p 60fps.
The process of fine-tuning ffmpeg
You can download mine ready structure for conversion at this linkbut I recommend creating it yourself, because the commands contain my paths on my device.
To create a structure yourself, follow these steps:
Create a folder where you will add your large files for conversion. I call it Google Photos Shelter.
Inside this folder, create 2 more folders:
– Converted Videos (converted videos will go there)
– Scripts (scripts for conversion will be stored there)The third file I add there is a Readme file, so that I don't forget how to use the process I created. I recommend editing this file to suit your needs, replacing my paths with your own.
To edit the Readme file you need to replace the following paths (I will explain later why this is necessary):
Replace
cd /d "E:\Photos\Google Photos Shelter\Scripts"
oncd /d "Ваш путь до папки со скриптами"
Replace
E:\Photos\Google Photos Shelter
on
"Ваш путь до папки с файлами"Replace
E:\Photos\Google Photos Shelter\Converted Videos
on"Ваш путь до папки с конвертированными видео"
In order for the conversion scripts to work on your device, you also need to edit them.
Here's how to do it:
Open script
1080p_60fps_horizontal_script.bat
in any text editor;Replace
set "INPUT_DIR=E:\Photos\Google Photos Shelter"
set "OUTPUT_DIR=E:\Photos\Google Photos Shelter\Converted Videos"
onset "INPUT_DIR=Ваш путь до папки со скриптами"
set "OUTPUT_DIR=Ваш путь до папки с конвертированными видео"
Do the same with the other scripts:
1080p_60fps_vertical_script.bat
1080p_30fps_vertical_script.bat
1080p_30fps_horizontal_script.bat
If you did everything correctly, then congratulations, now you have a personal instruction on how to convert files!
Conversion process
Now that everything is ready, you can convert your first files.
The fastest way would be:
Open any cloud you use and download large 4K videos from there;
Move the downloaded videos to the folder you created. I call it Google Photos Shelter. (This is the folder where the Converted Videos, Scripts, and Readme files are located).
Now you need to run the required script to convert the video:
Start > Terminal >
cd /d "Ваш путь до папки со скриптами"
Run the bat file for horizontal videos:
1080p_60fps_horizontal_script.bat
or
Run the bat file for vertical videos:
1080p_60fps_vertical_script.bat
Optional step – you can add the parameter “_skip” to the beginning of the file name and the script will not convert this video. This can be useful if you want to convert horizontal videos first and then vertical videos. Yes, unfortunately, the program does not distinguish between horizontal and vertical videos during the conversion process.
If you did everything correctly, all horizontal videos will be converted to 1080p 60fps and saved in the Converted Videos folder.
These converted videos, you can upload back to the cloud. If you have not changed the metadata of your files, they will be added in the correct time period. If something went wrong and the files were added to the very beginning, change the media creation date in the Windows file properties, as shown in the screenshot, or you can do the same inside the cloud.
In any unclear situation, refer to the Readme file, in it you will always find the correct order of actions.
Download all files from the cloud using Rclone
If you need to completely download all files from your cloud, you can do this using the Rclone program.
The order of settings before using Rclone:
Select the local drive where you want to store Rclone files;
Create a folder on your local disk (the name should not contain Cyrillic);
Transfer there all the contents of the archive that you downloaded from the Rclone website
Now we need to let the system know where we have inserted the executable files, so that the system will contact there every time we request it and run Rclone.
To do this:
Copy the path where you pasted the files from the archive, as shown in the screenshot:
For English version of Windows:
– Start > Search > Edit the system environment variables > Advanced > Environment Variables.
For Russian version of Windows:
– Start > Search > Edit system environment variables > Advanced > Environment variables.In the window that opens, you should find the lines with the Path variable and click Edit as shown in the screenshot below:
In the window that opens, it's time to create a new variable. Click the New button and create a new variable by pasting the path you copied there and click Ok. In the remaining windows, click Ok everywhere.
If you did everything correctly, then congratulations, you just set up Rclone and can download files from your cloud.
Rclone Detailed Configuration Process
Like ffmpeg, Rclone also works via the terminal, which is very convenient when you are downloading, for example, 200GB and you want to see which specific file is currently being downloaded, as well as see the overall download progress.
To check if Rclone is working properly, do the following:
To set up Rclone:
In the terminal or command line, run the command
rclone config
Create a new connection: enter
n
to create a new connectionEnter a name for your new connection, for example,
mygooglephotos
. Enter your name for your new connection and remember it. You will need it a little later.Select the type of cloud service by entering the provider number. For me it is
17
since I use Google Photos. You can see the list of supported services at this link.Press Enter to leave the default values for Client ID and Client Secret.
Select
1
to use Full accessPress Enter to skip the advanced settings.
Open the link in your browser to log in:
– Follow the instructions on the screen. Open the provided link in your browser and log in to Google Drive.
– After authorization, copy the provided code and paste it into the terminal.Enter
y
to confirm that you want to save the settings.Enter
q
to exit the configuration menu.
If you did everything correctly, it's time to download your entire cloud!
For your convenience, edit the Readme file to refresh your memory and remember the procedure at any time:
To edit the Readme file you need to replace the following paths:
Replace
rclone copy mygooglephotos:media/by-month "D:\Windows\Photos\Google Photos Backup" --verbose --progress --transfers 30
onrclone copy "названиевашегоподключения":media/by-month "Ваш путь до папки, куда вы будете скачивать все ваши фото и видео из облака" --verbose --progress --transfers 30
Try to remember the name of your connection, which you came up with when setting up Rclone on the command line. For me it was mygooglephotos.
Replace
rclone copy mygooglephotos:media/by-month "D:\Windows\Photos\Google Photos Backup" --verbose --progress --transfers 30 --size-only --no-update-modtime
onrclone copy "названиевашегоподключения":media/by-month "Ваш путь до папки, куда вы будете скачивать только новые фото и видео из облака" --verbose --progress --transfers 30 --size-only --no-update-modtime
Try to remember the name of your connection, which you came up with when setting up Rclone on the command line. For me it was mygooglephotos.
The process of downloading and synchronizing files from the cloud
Now is the time to use these commands!
Open a terminal and use one of the commands below:
To download all files from the cloud sorted only by month, you need to use this command:
rclone copy "названиевашегоподключения":media/by-month "Ваш путь до папки, куда вы будете скачивать все ваши фото и видео из облака" --verbose --progress --transfers 30
To sync only new or modified files from the cloud, you need to use this command:
rclone copy "названиевашегоподключения":media/by-month "Ваш путь до папки, куда вы будете скачивать только новые фото и видео из облака" --verbose --progress --transfers 30 --size-only --no-update-modtime
What do these commands do? Let's quickly figure it out:
rclone copy
– copies files from your cloud;mygooglephotos:media/by-month
– copies files from your cloud, specifically from the shared folder (its name is media). After that, it sorts these files on your computer by month, namely, the folders will look like this: Years > Months > Files.
If you want to replace sorting by month with sorting by year or day, then replace the parameterby-month
on parametersby-year
orby-day
respectively;"D:\Windows\Photos\Google Photos Backup"
– the path where your entire cloud will be downloaded;--verbose
– will calculate the total number of files downloaded from the cloud and show it to you during the download process;--progress
– will show you the download progress in percentage;--transfers 30
– will download 30 files at a time, but you can change it to 10 or, for example, 40;--size-only
– if you are synchronizing files and the folder where you are downloading new files from the cloud already contains files of the same size as the downloaded files, the system will skip these files. In my opinion, this is the best parameter in terms of quality and speed to avoid duplicates. You can also use the parameter--checksum
– it uses file checksums to check for changes, which may be slower but more accurate.--no-update-modtime
– prevents updating the file modification time on the local disk, which significantly speeds up the download process.
After you run one of the commands, the process of downloading all your files from the cloud to the specified directory will begin. For me, this is a WD 1TB HDD disk, on which I plan to store backups of all my data from Google Photos.
Conclusion
Given how much content we produce these days, I believe it is important to be responsible about storing personal information.
I hope this article will help people solve problems that seem impossible to them, and companies will allow their users to easily download their personal files from servers at any time.
I understand that this guide may seem complicated at first glance, but I tried to describe it in as simple language as possible.
If anyone has any difficulties, I will be happy to help in the comments.
Optimized storage for everyone!
Sources: ChatGPT 4o, World Wide Web, YouTube Indians, TroubleChute Channel