Title: [Windows] Automate downloading TalkImg backup files Post by: RickDeckard on June 08, 2023, 10:02:49 PM After some failed attempts in using Powershell to make a backup of the files (I'm bad I know), I managed to get a working setup in Windows using a combination of wget and Task Scheduler. If anyone is interested in making regular backups of the files provided by @joker_josue (and isn't very tech savy) you can use the following guide for Windows (thank you TryNinja for an alternative path) and Linux (thank you @LoyceV!):
WINDOWS Prerequisites: Grab wget.exe from here[1]. The code that I'll be using for creating the task can be one of these: Code: wget --progress=bar:force -r -c -nd -A.zip -np <URL>
If you'd like to have a different output folder for your files, there's a slightly variation of the code that you may use: Code: wget --progress=bar:force -r -c -nd -A.zip -np -P <Path to folder> <URL> As for creating the task: Open Task Scheduler This can be done by pressing the Windows Key and typing "Task Scheduler" Creating and setting up the task Click in "Create Basic Task" in the main window that opens as soon as you complete the previous step: https://talkimg.com/images/2024/01/20/3lC3g.png In the new menu that appears, name your task. I've named it "TalkImg Backup" and didn't provided an optional description (which is fine). Click "Next": https://talkimg.com/images/2024/01/20/3lQBI.png In this new menu you're free to choose how often this task will trigger. Considering that the website makes weekly backups (of the previous week), I've selected "Weekly". Click "Next": https://talkimg.com/images/2024/01/20/3lMdd.png I'm assuming that the backups will always be updated on a Sunday (as per last updated package). As such, select "Monday". You can also choose at which time the download occurs (for this example I've selected 08:00 (am)). When you're done setting up, click "Next": https://talkimg.com/images/2024/01/20/3lTmc.png On the next menu click on "Start a program" and then "Next": https://talkimg.com/images/2024/01/20/3l6hz.png On this new menu you get two important fields that need to be filled out: https://talkimg.com/images/2024/01/20/3lmz5.png
Code: wget --progress=bar:force -r -nd -A.zip -np -P "D:\TalkImg Backup" https://talkimg.com/tempbackups/ In the next menu you'll be able to review your task settings. For this example, the script will run "Weekly; At 08:00 every Monday of every week, starting 08/06/2023". If everything looks OK, just go ahead and click on "Finish": https://talkimg.com/images/2024/01/20/3lPl2.png TryNinja CMD method To whoever prefers using the command line, you can also create the task with this command: Quote SCHTASKS /Create /TN "TalkImg Backup" /SC WEEKLY /D MON /ST 08:00 /TR "C:\path\to\wget.exe --progress=bar:force -r -nd -A.zip -np -P \"D:\TalkImg Backup\" https://talkimg.com/tempbackups/" Just make sure to change the path to where wget.exe is located and also where to save the files (i.e D:\TalkImg Backup\). LINUX I use this on Linux in a cronjob: Congratulations! You've created you task and you are now acting as a backup agent for the images hosted on TalkImg. Horray!Code: #!/bin/bash I use a random time to spread server bandwidth. It takes only a second to run again, so it doesn't matter to use daily checks for new data. CHANGELOG
[1]https://eternallybored.org/misc/wget/ (https://eternallybored.org/misc/wget/) Title: Re: [Windows] Automate downloading TalkImg backup files Post by: joker_josue on June 09, 2023, 06:55:29 AM Thanks for making this tutorial.
If that's okay, I'll share it in the OP of the TalkImg thread. ;) Title: Re: [Windows] Automate downloading TalkImg backup files Post by: RickDeckard on June 09, 2023, 11:44:42 AM Thanks for making this tutorial. Thank you for the words. Sure you can, I appreciate your efforts. Any way that we can show awareness to other forum users about ways to backup the files on your server is always a great advantage from my perspective.If that's okay, I'll share it in the OP of the TalkImg thread. ;) Title: Re: [Windows] Automate downloading TalkImg backup files Post by: rdluffy on June 09, 2023, 12:22:51 PM Good job RickDeckard ;)
I have 2 questions: 1 - In this case of making the weekly backup, it will make the complete backup everytime, right? Would it be possible to backup only the new files of that week, or do you have to download everything again every week? 2 - Has anyone already done the backup? How many GBs of pictures are there? Title: Re: [Windows] Automate downloading TalkImg backup files Post by: RickDeckard on June 09, 2023, 12:44:08 PM Good job RickDeckard ;) I may be wrong, but joker_josue always updates all 3 links,you can see that from the filenames (they have the date of when the backup is made). In that case you will always have new files with new information. Since the backups include the new images from the previous week, you will always have to download the new .zip files that are posted on the url provided. I have 2 questions: 1 - In this case of making the weekly backup, it will make the complete backup everytime, right? Would it be possible to backup only the new files of that week, or do you have to download everything again every week? 2 - Has anyone already done the backup? How many GBs of pictures are there? backup_20230527103002.zip -> 3,94 GBbackup_20230528000001.zip -> 106 MB backup_20230604000002.zip -> 5560 MB Title: Re: [Windows] Automate downloading TalkImg backup files Post by: joker_josue on June 09, 2023, 05:56:01 PM Good job RickDeckard ;) I may be wrong, but joker_josue always updates all 3 links,you can see that from the filenames (they have the date of when the backup is made). In that case you will always have new files with new information. Since the backups include the new images from the previous week, you will always have to download the new .zip files that are posted on the url provided. I have 2 questions: 1 - In this case of making the weekly backup, it will make the complete backup everytime, right? Would it be possible to backup only the new files of that week, or do you have to download everything again every week? 2 - Has anyone already done the backup? How many GBs of pictures are there? backup_20230527103002.zip -> 3,94 GBbackup_20230528000001.zip -> 106 MB backup_20230604000002.zip -> 5560 MB Just a note: Backup zip files are only available for 15 days. That is, today's zip, 15 days later will be deleted. And each new backup only has images from the last week. Therefore, someone who wants to keep all the backups should copy the first zip by this weekend. For he must be eliminated. The system is all automatic, so I recommend that attention. Title: Re: [Windows] Automate downloading TalkImg backup files Post by: LoyceV on June 09, 2023, 06:19:44 PM 1 - In this case of making the weekly backup, it will make the complete backup everytime, right? Would it be possible to backup only the new files of that week, or do you have to download everything again every week? I may be wrong, but joker_josue always updates all 3 links,you can see that from the filenames (they have the date of when the backup is made). In that case you will always have new files with new information. Since the backups include the new images from the previous week, you will always have to download the new .zip files that are posted on the url provided.Code: -c I use this on Linux in a cronjob: Code: #!/bin/bash I use a random time to spread server bandwidth. It takes only a second to run again, so it doesn't matter to use daily checks for new data. Lol@Windows task scheduler. So much more complicated than a cronjob :P Title: Re: [Windows] Automate downloading TalkImg backup files Post by: joker_josue on June 09, 2023, 06:37:43 PM There's one flaw: if joker_josue would replace an old .zip by something else with the same name, it would overwrite my local file. But my local "Time Machine" backups make sure I won't lose files that way. I use a random time to spread server bandwidth. It takes only a second to run again, so it doesn't matter to use daily checks for new data. But my system doesn't rewrite an existing zip. It always creates a new one, with the new name, containing the new images since the last execution of the task (7 days). Title: Re: [Windows] Automate downloading TalkImg backup files Post by: LoyceV on June 09, 2023, 06:44:30 PM But my system doesn't rewrite an existing zip. It always creates a new one, with the new name, containing the new images since the last execution of the task (7 days). I assumed nothing less :) It's just me being thorough: always make sure a new backup can't accidentally overwrite your old backup and destroy your only copy.Title: Re: [Windows] Automate downloading TalkImg backup files Post by: dkbit98 on June 09, 2023, 08:13:12 PM Congratulations! You've created you task and you are now acting as a backup agent for the images hosted on TalkImg. Horray! So you are just assuming most of the people are using wInD0ws 0S? How about tutorials for Mac and Linux users? ;)Luckily LoyceV already posted above how this can be done with Linux, and there is also GUI for everyone who prefers that. Title: Re: [Windows] Automate downloading TalkImg backup files Post by: LoyceV on June 10, 2023, 07:14:15 AM So you are just assuming most of the people are using wInD0ws 0S? How about tutorials for Mac and Linux users? ;) I'm assuming you didn't assume he may be assuming Linux users don't need a tutorial ;) I mean: 2 lines vs 4 pages :DTitle: Re: [Windows] Automate downloading TalkImg backup files Post by: TryNinja on June 10, 2023, 07:25:14 AM To whoever prefers using the command line, you can also create the task with this command:
Quote SCHTASKS /Create /TN "TalkImg Backup" /SC WEEKLY /D MON /ST 08:00 /TR "C:\path\to\wget.exe --progress=bar:force -r -nd -A.zip -np -P \"D:\TalkImg Backup\" https://talkimg.com/tempbackups/" Just make sure to change the path to where wget.exe is located and also where to save the files (i.e D:\TalkImg Backup\). Title: Re: [Windows] Automate downloading TalkImg backup files Post by: RickDeckard on June 10, 2023, 09:39:50 AM If you run the same wget command again right after downloading, does it redownload everything? If so, you should add the "-c" option: Just tested this and it does redownload everything that is on the folder, without making any check if previous files (with the same name) were downloaded before. I'll add that argument in the original code to prevent this. Thank you!Code: -c Lol@Windows task scheduler. So much more complicated than a cronjob :P It's Windows, what can I do ¯\_(ツ)_/¯.Congratulations! You've created you task and you are now acting as a backup agent for the images hosted on TalkImg. Horray! So you are just assuming most of the people are using wInD0ws 0S? How about tutorials for Mac and Linux users? ;)Luckily LoyceV already posted above how this can be done with Linux, and there is also GUI for everyone who prefers that. I use this on Linux in a cronjob: Code: #!/bin/bash To whoever prefers using the command line, you can also create the task with this command: If both of you allow me, can I add these entries in the OP? @LoyceV would cover Linux users and @TryNinja is great alternative for those that are comfortable with cmd.Quote SCHTASKS /Create /TN "TalkImg Backup" /SC WEEKLY /D MON /ST 08:00 /TR "C:\path\to\wget.exe --progress=bar:force -r -nd -A.zip -np -P \"D:\TalkImg Backup\" https://talkimg.com/tempbackups/" Just make sure to change the path to where wget.exe is located and also where to save the files (i.e D:\TalkImg Backup\). Title: Re: [Windows] Automate downloading TalkImg backup files Post by: LoyceV on June 10, 2023, 04:57:51 PM If both of you allow me, can I add these entries in the OP? Of course, quoting public posts is always allowed.Title: Re: [Windows] Automate downloading TalkImg backup files Post by: TryNinja on June 10, 2023, 09:32:29 PM If both of you allow me, can I add these entries in the OP? Of course, quoting public posts is always allowed.Title: Re: [Windows] Automate downloading TalkImg backup files Post by: RickDeckard on June 11, 2023, 01:56:16 PM If both of you allow me, can I add these entries in the OP? Of course, quoting public posts is always allowed. |