{"id":766,"date":"2021-02-02T03:32:00","date_gmt":"2021-02-02T03:32:00","guid":{"rendered":"http:\/\/bullyrooks.com\/?p=766"},"modified":"2021-05-30T09:35:33","modified_gmt":"2021-05-30T16:35:33","slug":"backing-up-google-photos-to-your-synology-nas","status":"publish","type":"post","link":"https:\/\/bullyrooks.com\/index.php\/2021\/02\/02\/backing-up-google-photos-to-your-synology-nas\/","title":{"rendered":"Backing Up Google Photos to Your Synology NAS"},"content":{"rendered":"\n<p>One of the main purposes of your NAS can be to support data backup.  Even if you are backing up from a computer into your NAS, I still recommend having an offsite or cloud backup solution.  <\/p>\n\n\n\n<p>Both my wife and I use google photos which is nice because picture and movies taken on your phone are automatically backed up in google photos and are available online.<\/p>\n\n\n\n<p>However, we recently lost a bunch of data from google photos.  An accident deleted a years worth of photos and unfortunately, there&#8217;s now no way to get them back.  I decided that it would be worth it to have a NAS backup of that data, which is inline with my vision of having one set of data on the device (phone, laptop or desktop), one version on the NAS and one version in the Cloud (google or in our case, backblaze which I&#8217;ll cover in another article).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Code Repository<\/h2>\n\n\n\n<p>I found a docker based task which will log into your google photo account, pull down anything it finds there and copy it to your NAS.  The code repository is <a href=\"https:\/\/github.com\/gilesknap\/gphotos-sync\" data-type=\"URL\" data-id=\"https:\/\/github.com\/gilesknap\/gphotos-sync\">here<\/a> and it has the documentation.  <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setting Up Your NAS<\/h2>\n\n\n\n<p>You&#8217;ll need to make some new directories<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/volume1\/docker\/gphotosync\n\/volume1\/${your user directory}\/gphotos<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Setup Google to Allow Access<\/h2>\n\n\n\n<p>I&#8217;m actually following the directions <a href=\"https:\/\/docs.google.com\/document\/d\/1ck1679H8ifmZ_4eVbDeD_-jezIcZ-j6MlaNaeQiz7y0\/edit#\">here<\/a>.  I&#8217;m going to copy them here to make it easier to read and follow along.  There have also been some updates which I&#8217;ll cover in my docs.<\/p>\n\n\n\n<p>Go to <a href=\"https:\/\/console.cloud.google.com\/cloud-resource-manager\">google cloud platform<\/a>.  You automatically have an account as a google service user.  Just log in with the same account you use on your phone.<\/p>\n\n\n\n<p>Click <code>Create Project <\/code>button<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"377\" height=\"92\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-3.png?resize=377%2C92&#038;ssl=1\" alt=\"\" class=\"wp-image-770\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-3.png?w=377&amp;ssl=1 377w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-3.png?resize=300%2C73&amp;ssl=1 300w\" sizes=\"auto, (max-width: 377px) 100vw, 377px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>Call it <code>gphoto-sync<\/code> and hit create<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"549\" height=\"395\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-4.png?resize=549%2C395&#038;ssl=1\" alt=\"\" class=\"wp-image-771\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-4.png?w=549&amp;ssl=1 549w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-4.png?resize=300%2C216&amp;ssl=1 300w\" sizes=\"auto, (max-width: 549px) 100vw, 549px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>In order to enable access we need to go to the photo api.  Click on the project you just created<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"423\" height=\"401\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-5.png?resize=423%2C401&#038;ssl=1\" alt=\"\" class=\"wp-image-772\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-5.png?w=423&amp;ssl=1 423w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-5.png?resize=300%2C284&amp;ssl=1 300w\" sizes=\"auto, (max-width: 423px) 100vw, 423px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>In the search box type photos<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"953\" height=\"242\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-6.png?resize=953%2C242&#038;ssl=1\" alt=\"\" class=\"wp-image-773\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-6.png?w=953&amp;ssl=1 953w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-6.png?resize=300%2C76&amp;ssl=1 300w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-6.png?resize=768%2C195&amp;ssl=1 768w\" sizes=\"auto, (max-width: 953px) 100vw, 953px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>Pick photos library api<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"242\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-7.png?resize=960%2C242&#038;ssl=1\" alt=\"\" class=\"wp-image-774\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-7.png?w=964&amp;ssl=1 964w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-7.png?resize=300%2C76&amp;ssl=1 300w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-7.png?resize=768%2C194&amp;ssl=1 768w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-7.png?resize=960%2C243&amp;ssl=1 960w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>Select Enable<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"593\" height=\"385\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-8.png?resize=593%2C385&#038;ssl=1\" alt=\"\" class=\"wp-image-775\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-8.png?w=593&amp;ssl=1 593w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-8.png?resize=300%2C195&amp;ssl=1 300w\" sizes=\"auto, (max-width: 593px) 100vw, 593px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>This allows your account to use the photos API.  We still need to authorize our app to access that API though.<\/p>\n\n\n\n<p>Go the the <a href=\"https:\/\/console.cloud.google.com\/apis\/dashboard\" data-type=\"URL\" data-id=\"https:\/\/console.cloud.google.com\/apis\/dashboard\">consoles api page<\/a>. (make sure that gphoto project is active in the dropdown).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"430\" height=\"379\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-17.png?resize=430%2C379&#038;ssl=1\" alt=\"\" class=\"wp-image-784\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-17.png?w=430&amp;ssl=1 430w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-17.png?resize=300%2C264&amp;ssl=1 300w\" sizes=\"auto, (max-width: 430px) 100vw, 430px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>Click OAuth consent screen.  Select External and hit Create<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"797\" height=\"601\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-18.png?resize=797%2C601&#038;ssl=1\" alt=\"\" class=\"wp-image-785\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-18.png?w=797&amp;ssl=1 797w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-18.png?resize=300%2C226&amp;ssl=1 300w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-18.png?resize=768%2C579&amp;ssl=1 768w\" sizes=\"auto, (max-width: 797px) 100vw, 797px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>Type a name for the app and select an email from the dropdown<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"628\" height=\"518\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-14.png?resize=628%2C518&#038;ssl=1\" alt=\"\" class=\"wp-image-781\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-14.png?w=628&amp;ssl=1 628w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-14.png?resize=300%2C247&amp;ssl=1 300w\" sizes=\"auto, (max-width: 628px) 100vw, 628px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>You&#8217;ll need to add another email for the developer contact info.  Then hit Save and continue.<\/p>\n\n\n\n<p>Don&#8217;t set any scopes and hit Save and Continue.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"572\" height=\"790\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-15.png?resize=572%2C790&#038;ssl=1\" alt=\"\" class=\"wp-image-782\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-15.png?w=572&amp;ssl=1 572w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-15.png?resize=217%2C300&amp;ssl=1 217w\" sizes=\"auto, (max-width: 572px) 100vw, 572px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>Don&#8217;t set any test users and hit save and continue<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"607\" height=\"556\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-16.png?resize=607%2C556&#038;ssl=1\" alt=\"\" class=\"wp-image-783\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-16.png?w=607&amp;ssl=1 607w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-16.png?resize=300%2C275&amp;ssl=1 300w\" sizes=\"auto, (max-width: 607px) 100vw, 607px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>On the summary page hit back to dashboard.  Now select Credentials, select create credentials and select OAuth Id from the dropdown<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"323\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-19-1024x344.png?resize=960%2C323&#038;ssl=1\" alt=\"\" class=\"wp-image-786\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-19.png?resize=1024%2C344&amp;ssl=1 1024w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-19.png?resize=300%2C101&amp;ssl=1 300w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-19.png?resize=768%2C258&amp;ssl=1 768w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-19.png?resize=1536%2C516&amp;ssl=1 1536w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-19.png?w=1625&amp;ssl=1 1625w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>Select <code>Desktop Application<\/code> as the application type.  Use <code>gphoto-sync<\/code> as the app name.  Hit Create<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"581\" height=\"347\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-27.png?resize=581%2C347&#038;ssl=1\" alt=\"\" class=\"wp-image-795\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-27.png?w=581&amp;ssl=1 581w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-27.png?resize=300%2C179&amp;ssl=1 300w\" sizes=\"auto, (max-width: 581px) 100vw, 581px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>When you get back to the main screen hit download secret file.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"98\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-21-1024x104.png?resize=960%2C98&#038;ssl=1\" alt=\"\" class=\"wp-image-788\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-21.png?resize=1024%2C104&amp;ssl=1 1024w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-21.png?resize=300%2C30&amp;ssl=1 300w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-21.png?resize=768%2C78&amp;ssl=1 768w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-21.png?w=1340&amp;ssl=1 1340w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>Go back to Oauth consent screen and hit publish app<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"621\" height=\"368\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-22.png?resize=621%2C368&#038;ssl=1\" alt=\"\" class=\"wp-image-789\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-22.png?w=621&amp;ssl=1 621w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-22.png?resize=300%2C178&amp;ssl=1 300w\" sizes=\"auto, (max-width: 621px) 100vw, 621px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>You should see that it has been published.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"623\" height=\"426\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-23.png?resize=623%2C426&#038;ssl=1\" alt=\"\" class=\"wp-image-790\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-23.png?w=623&amp;ssl=1 623w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-23.png?resize=300%2C205&amp;ssl=1 300w\" sizes=\"auto, (max-width: 623px) 100vw, 623px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Start Docker and Authorize Your App<\/h2>\n\n\n\n<p>Copy your secrets file up into your <code>\/volume1\/docker\/gphotosync<\/code> directory.  Rename it to <code>client_secret.json<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"829\" height=\"331\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-26.png?resize=829%2C331&#038;ssl=1\" alt=\"\" class=\"wp-image-793\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-26.png?w=829&amp;ssl=1 829w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-26.png?resize=300%2C120&amp;ssl=1 300w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-26.png?resize=768%2C307&amp;ssl=1 768w\" sizes=\"auto, (max-width: 829px) 100vw, 829px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>Its not going to sync the first time.  You need to actually authorize your client to access that API.  <\/p>\n\n\n\n<p>First, start up docker.  You need to do this via <a href=\"https:\/\/bullyrooks.com\/index.php\/2021\/01\/24\/using-ssh-on-windows\/\" data-type=\"post\" data-id=\"576\">SSH<\/a>.  We&#8217;re using interactive mode (-it) so that we can interact with the application as its running.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>~$ sudo docker run \\\n    -ti \\\n    --name gphotos-sync \\\n    -v \/volume1\/${your user directory}\/gphotos:\/storage \\\n    -v \/volume1\/docker\/gphotosync:\/config \\\n    gilesknap\/gphotos-sync:latest \\\n   \/storage<\/code><\/pre>\n\n\n\n<p>you should see a message similar to this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>-02 15:00:02 WARNING  gphotos-sync 2.14.2 2021-02-02 15:00:02.202815\nPlease go here and authorize, https:\/\/accounts.google.com\/o\/oauth2\/v2\/auth?response_type=code&amp;client_id=8...ch7.apps.googleusercontent.com&amp;redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&amp;scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fphotoslibrary.readonly+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fphotoslibrary.sharing&amp;state=lN1...v08&amp;access_type=offline&amp;prompt=select_account\nPaste the response token here:<\/code><\/pre>\n\n\n\n<p>copy the url from the screen and paste it into a browser.  You&#8217;ll see a google OAuth window.  Select your account (that you want to get the photos from)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"470\" height=\"246\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-28.png?resize=470%2C246&#038;ssl=1\" alt=\"\" class=\"wp-image-797\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-28.png?w=470&amp;ssl=1 470w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-28.png?resize=300%2C157&amp;ssl=1 300w\" sizes=\"auto, (max-width: 470px) 100vw, 470px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>You&#8217;ll see a warning window.  Click <code>Advanced <\/code>and <code>Go to gphoto-sync<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"690\" height=\"491\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-29.png?resize=690%2C491&#038;ssl=1\" alt=\"\" class=\"wp-image-798\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-29.png?w=690&amp;ssl=1 690w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-29.png?resize=300%2C213&amp;ssl=1 300w\" sizes=\"auto, (max-width: 690px) 100vw, 690px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>You&#8217;ll see two permissions windows.  Click Allow on both<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"334\" height=\"224\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-30.png?resize=334%2C224&#038;ssl=1\" alt=\"\" class=\"wp-image-799\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-30.png?w=334&amp;ssl=1 334w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-30.png?resize=300%2C201&amp;ssl=1 300w\" sizes=\"auto, (max-width: 334px) 100vw, 334px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"335\" height=\"226\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-31.png?resize=335%2C226&#038;ssl=1\" alt=\"\" class=\"wp-image-800\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-31.png?w=335&amp;ssl=1 335w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-31.png?resize=300%2C202&amp;ssl=1 300w\" sizes=\"auto, (max-width: 335px) 100vw, 335px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>Click Allow on the next confirmation window<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"451\" height=\"646\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-32.png?resize=451%2C646&#038;ssl=1\" alt=\"\" class=\"wp-image-801\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-32.png?w=451&amp;ssl=1 451w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-32.png?resize=209%2C300&amp;ssl=1 209w\" sizes=\"auto, (max-width: 451px) 100vw, 451px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>Grab the token from the sign in page.  Copy it into your clipboard<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"497\" height=\"496\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-33.png?resize=497%2C496&#038;ssl=1\" alt=\"\" class=\"wp-image-802\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-33.png?w=497&amp;ssl=1 497w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-33.png?resize=300%2C300&amp;ssl=1 300w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-33.png?resize=150%2C150&amp;ssl=1 150w\" sizes=\"auto, (max-width: 497px) 100vw, 497px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>and paste it into your SSH prompt and hit enter.  You should see it start to process your images<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>02-02 15:05:32 WARNING  Indexing Google Photos Files ...\n02-02 15:05:33 WARNING  indexed 3 items\n02-02 15:05:33 WARNING  Downloading Photos ...<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Automating the Backup<\/h2>\n\n\n\n<p>This script only executes once.  It will download all of your photos (unless there&#8217;s a failure and the container stops), but it won&#8217;t pick up any new ones since the last time it ran.  Now we need a way to tell the container to run daily (or weekly, etc&#8230;).  You can write a <code>cron <\/code>to schedule the container to run, but I actually like the Synology <code>Task Scheduler<\/code> for this.<\/p>\n\n\n\n<p>Go to the DSM and open up the <code>Control Panel<\/code> (make sure Advanced Mode is enabled) and open Task Scheduler.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"552\" height=\"153\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-34.png?resize=552%2C153&#038;ssl=1\" alt=\"\" class=\"wp-image-804\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-34.png?w=552&amp;ssl=1 552w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-34.png?resize=300%2C83&amp;ssl=1 300w\" sizes=\"auto, (max-width: 552px) 100vw, 552px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>Create a new Scheduled Task for a User-defined Script<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"345\" height=\"162\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-35.png?resize=345%2C162&#038;ssl=1\" alt=\"\" class=\"wp-image-805\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-35.png?w=345&amp;ssl=1 345w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-35.png?resize=300%2C141&amp;ssl=1 300w\" sizes=\"auto, (max-width: 345px) 100vw, 345px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>Give the task a name (I use Google Photo Sync) and run as root<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"530\" height=\"236\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-36.png?resize=530%2C236&#038;ssl=1\" alt=\"\" class=\"wp-image-806\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-36.png?w=530&amp;ssl=1 530w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-36.png?resize=300%2C134&amp;ssl=1 300w\" sizes=\"auto, (max-width: 530px) 100vw, 530px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>Schedule to run daily at some time (I use the default of midnight)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"525\" height=\"515\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-37.png?resize=525%2C515&#038;ssl=1\" alt=\"\" class=\"wp-image-807\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-37.png?w=525&amp;ssl=1 525w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-37.png?resize=300%2C294&amp;ssl=1 300w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>On Task Settings you can set a notification email (but this can get noisy).  Make sure to set User-defined script to run your docker container with the name of the container you just created<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker container start gphotos-sync<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"533\" height=\"531\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-38.png?resize=533%2C531&#038;ssl=1\" alt=\"\" class=\"wp-image-808\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-38.png?w=533&amp;ssl=1 533w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-38.png?resize=300%2C300&amp;ssl=1 300w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/02\/image-38.png?resize=150%2C150&amp;ssl=1 150w\" sizes=\"auto, (max-width: 533px) 100vw, 533px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>You&#8217;ll need to repeat this process for each account you want to backup.  This means generating a client secrets for each user, creating a separate docker container (with a unique name) and separate scheduled task.  <\/p>\n\n\n\n<p>Please let me know how this worked for you in the comments.  I would like to hear if it worked exactly as I described or if there are modifications that you needed to make in order to get it going so that I can update the documentation if needed.<\/p>\n\n\n\n<p>Also, please checkout my other projects and courses related to using your <a href=\"https:\/\/bullyrooks.com\/index.php\/category\/home-networking\/synology\/\" data-type=\"category\" data-id=\"36\">synology <\/a>and other backup solutions.<\/p>\n\n\n\n<p>Finally, if you&#8217;re having issues with google permissions (or rate limiting?) <a href=\"https:\/\/bullyrooks.com\/index.php\/course\/migrating_away_from_google_photo_storage\/\">I have an alternate method that you can use with the DSFile application and Google takeout<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"entry-summary\">\nOne of the main purposes of your NAS can be to support&hellip;\n<\/div>\n<div class=\"link-more\"><a href=\"https:\/\/bullyrooks.com\/index.php\/2021\/02\/02\/backing-up-google-photos-to-your-synology-nas\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &ldquo;Backing Up Google Photos to Your Synology NAS&rdquo;<\/span>&hellip;<\/a><\/div>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,36],"tags":[],"course":[],"class_list":["post-766","post","type-post","status-publish","format-standard","hentry","category-home-networking","category-synology","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":1047,"url":"https:\/\/bullyrooks.com\/index.php\/2021\/05\/30\/migrating-away-from-google-photos-using-your-nas-overview\/","url_meta":{"origin":766,"position":0},"title":"Migrating Away From Google Photos Using your NAS : Overview","author":"Bullyrook","date":"May 30, 2021","format":false,"excerpt":"Recently, Google has announced that they will no longer support storing unlimited photos in the high resolution format for free. This bothered me a little bit, because google photo storage is so convenient that I use it a lot and therefore would be affected by their data cap. Additionally, I'm\u2026","rel":"","context":"In &quot;Home Networking&quot;","block_context":{"text":"Home Networking","link":"https:\/\/bullyrooks.com\/index.php\/category\/technology\/home-networking\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1049,"url":"https:\/\/bullyrooks.com\/index.php\/2021\/05\/30\/synchronize-your-android-photos-to-your-nas\/","url_meta":{"origin":766,"position":1},"title":"Synchronize Your Android Photos to Your NAS","author":"Bullyrook","date":"May 30, 2021","format":false,"excerpt":"The first step is to synchronize the photos that you take on your device to your NAS. The nice part of this solution is that you can use both google photos as well as your NAS for data synchronization, so if you decide that you don't like or want to\u2026","rel":"","context":"In &quot;backup&quot;","block_context":{"text":"backup","link":"https:\/\/bullyrooks.com\/index.php\/category\/technology\/home-networking\/backup\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/05\/image-8.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1054,"url":"https:\/\/bullyrooks.com\/index.php\/2021\/05\/30\/use-google-takeout-to-backfill-your-photo-sync\/","url_meta":{"origin":766,"position":2},"title":"Use Google Takeout to Backfill your Photo Sync","author":"Bullyrook","date":"May 30, 2021","format":false,"excerpt":"Now you should have any new photos backed up to your NAS. But you'll probably want all of your old photos too. There are several ways to do this (including a previous solution I used to use). However, if you just need to do a backfill, I think google takeout\u2026","rel":"","context":"In &quot;backup&quot;","block_context":{"text":"backup","link":"https:\/\/bullyrooks.com\/index.php\/category\/technology\/home-networking\/backup\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/05\/image-14.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1029,"url":"https:\/\/bullyrooks.com\/index.php\/2021\/05\/29\/backup-synology-to-backblaze-prerequisites\/","url_meta":{"origin":766,"position":3},"title":"Backup Synology to BackBlaze Prerequisites","author":"Bullyrook","date":"May 29, 2021","format":false,"excerpt":"In this course I'll explain how to backup your Synology NAS to BackBlaze using the personal backup plan. This will allow you to backup 'unlimited' data at a low annual rate. Although Synology cloud sync allows you to backup to BackBlaze via B2 this service could get quite expensive for\u2026","rel":"","context":"In &quot;Home Networking&quot;","block_context":{"text":"Home Networking","link":"https:\/\/bullyrooks.com\/index.php\/category\/technology\/home-networking\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1032,"url":"https:\/\/bullyrooks.com\/index.php\/2021\/05\/30\/map-your-usb-drive-as-an-external-drive-on-your-nas\/","url_meta":{"origin":766,"position":4},"title":"Map Your USB Drive as an External Drive on Your NAS","author":"Bullyrook","date":"May 30, 2021","format":false,"excerpt":"First hook up your external USB HDD to your PC, hook up the power and make sure that its visible from your computer. Next we're going to mount it from the NAS so that we can start syncing files to it. On your PC, we're going to want to share\u2026","rel":"","context":"In &quot;Home Networking&quot;","block_context":{"text":"Home Networking","link":"https:\/\/bullyrooks.com\/index.php\/category\/technology\/home-networking\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/05\/image-1.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1037,"url":"https:\/\/bullyrooks.com\/index.php\/2021\/05\/30\/setup-webdav-sync-to-your-external-drive\/","url_meta":{"origin":766,"position":5},"title":"Setup WebDAV Sync to Your External Drive","author":"Bullyrook","date":"May 30, 2021","format":false,"excerpt":"We're going to be using WebDAV sync since this is fairly easy to setup. Setup the WebDAV Server on the NAS Install WebDAV Server from the package center. Set it up according to the Synology documentation. Go to Cloud Sync package from the package manager (or install it if you\u2026","rel":"","context":"In &quot;Home Networking&quot;","block_context":{"text":"Home Networking","link":"https:\/\/bullyrooks.com\/index.php\/category\/technology\/home-networking\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/05\/image-3.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/766","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/comments?post=766"}],"version-history":[{"count":10,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/766\/revisions"}],"predecessor-version":[{"id":1061,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/766\/revisions\/1061"}],"wp:attachment":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/media?parent=766"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/categories?post=766"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/tags?post=766"},{"taxonomy":"course","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/course?post=766"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}