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:

  1. 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.

  2. 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:

  1. Delete 4K videos and free up cloud space.
    Pros: you made room
    Cons: you lost your memories

  2. Download 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:

  1. Go to Google Photos;

  2. 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);

  3. Download all photos and videos to a local disk (everything is downloaded as an archive in the browser);

  4. Unzip the archive;

  5. Sort all 14,000 files by dates or events (this is already quite a big and tedious job);

  6. Delete all photos and videos from the cloud, start filling the cloud again;

  7. And so every two years.

Sounds like a hell of a job!

For large 4K videos:

  1. Go to Google Photos;

  2. Sort all videos by size;

  3. Download large 4K videos;

  4. Open these videos in Movavi Video Editor Plus;

  5. Convert 4K to 1080p 60fps;

  6. 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.

      I used Version v7.0.2 - ffmpeg-release-full.7z

    I used Version v7.0.2 – ffmpeg-release-full.7z

  • 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.

    I used Release v1.67.0 for Intel/AMD - 64 Bit - Windows

    I used Release v1.67.0 for Intel/AMD – 64 Bit – Windows

Converting video using FFMPEG

The order of settings before using ffmpeg:

  1. Select the local disk where you want to store the downloaded ffmpeg program files;

  2. Create a folder on your local disk (the name should not contain Cyrillic);

  3. 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:

  1. Copy the path where you pasted the files from the archive, as shown in the screenshot:

    You can click on the box and copy the file location.

    You can click on the box and copy the file location.

  2. 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:

    Once in Environment Variables, click on Edit Path variable

    Once in Environment Variables, click on Edit Path variable

  3. 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.

    Create a new variable with the path to ffmpeg

    Create a new variable with the path to ffmpeg

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:

  1. Launch Windows Terminal. Start > Search > Terminal

  2. 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:

    Correct system response to a request to launch ffmpeg at the specified path

    Correct system response to a request to launch ffmpeg at the specified path

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.

Structure inside the Google Photos Shelter folder

Structure inside the Google Photos Shelter folder

To create a structure yourself, follow these steps:

  1. Create a folder where you will add your large files for conversion. I call it Google Photos Shelter.

  2. Inside this folder, create 2 more folders:
    – Converted Videos (converted videos will go there)
    – Scripts (scripts for conversion will be stored there)

  3. 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):

  1. Replace
    cd /d "E:\Photos\Google Photos Shelter\Scripts"
    on
    cd /d "Ваш путь до папки со скриптами"

  2. Replace
    E:\Photos\Google Photos Shelter
    on
    "Ваш путь до папки с файлами"

  3. 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:

  1. Open script 1080p_60fps_horizontal_script.bat in any text editor;

  2. Replace
    set "INPUT_DIR=E:\Photos\Google Photos Shelter"
    set "OUTPUT_DIR=E:\Photos\Google Photos Shelter\Converted Videos"
    on
    set "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:

  1. Open any cloud you use and download large 4K videos from there;

  2. 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:

  1. Start > Terminal > cd /d "Ваш путь до папки со скриптами"

  2. 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

  3. 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.

    Video with parameter "_skip" at the beginning of the name will be skipped by the script

    Videos with the parameter “_skip” at the beginning of the title will be skipped by the script

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.

Changing the media creation date in the file properties

Changing the media creation date in the file properties

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:

  1. Select the local drive where you want to store Rclone files;

  2. Create a folder on your local disk (the name should not contain Cyrillic);

  3. 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:

  1. Copy the path where you pasted the files from the archive, as shown in the screenshot:

    You can click on the box and copy the file location.

    You can click on the box and copy the file location.

  2. 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:

    Once you are in Environment Variables, click on "Edit" variable Path

    Once in Environment Variables, click on Edit Path variable

  3. 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.

    Create a new variable with the path to ffmpeg

    Create a new variable with the path to Rclone location

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:

  1. In the terminal or command line, run the command rclone config

  2. Create a new connection: enter nto create a new connection

  3. Enter 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.

  4. 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.

  5. Press Enter to leave the default values ​​for Client ID and Client Secret.

  6. Select 1to use Full access

  7. Press Enter to skip the advanced settings.

  8. 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.

  9. Enter yto confirm that you want to save the settings.

  10. Enter qto 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:

  1. Replace
    rclone copy mygooglephotos:media/by-month "D:\Windows\Photos\Google Photos Backup" --verbose --progress --transfers 30
    on
    rclone 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.

  2. Replace
    rclone copy mygooglephotos:media/by-month "D:\Windows\Photos\Google Photos Backup" --verbose --progress --transfers 30 --size-only --no-update-modtime
    on
    rclone 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 parameter by-month on parameters by-year or by-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

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *