My aim is to back up all of my questions and answers and anything else valuable in my accounts across all of the StackExchange sites (StackOverflow, SuperUser, https://apple.stackexchange.com/, https://askubuntu.com/, etc).
ryancwalsh/stack-exchange-backup-laravel is a Laravel package for my aim is to back up all of my questions and answers and anything else valuable in my accounts across all of the stackexchange sites (stackoverflow, superuser, https://apple.stackexchange.com/, https://askubuntu.com/, etc)..
It currently has 4 GitHub stars and 26 downloads on Packagist (latest version 2.0.8).
Install it with composer require ryancwalsh/stack-exchange-backup-laravel.
Discover more Laravel packages by ryancwalsh
or browse all Laravel packages to compare alternatives.
Last updated
Allows you to export JSON files of your most important data (questions, answers, comments, favorites) from each of your Stack Exchange sites (Stack Overflow, Super User, Server Fault, etc).
composer create-project --prefer-dist laravel/laravel stackExchangeBackupDemo)vagrant@vboxHomestead:~/Code/MyLaravelProject$ composer require ryancwalsh/stack-exchange-backup-laravel:^2.0.6 (but use whatever the latest release tag number is at https://github.com/ryancwalsh/StackExchangeBackupLaravelPHP/releases).php artisan vendor:publish, and if it gives you a choice, choose to publish from this package..env file to have your own StackApps values. A non-working sample is below.php artisan exportStackExchange. There are also these options available:
php artisan exportStackExchange --forgetCache is an available option to clear the cached access code value.php artisan exportStackExchange --code="YOUR_CODE" is an available option to provide a code that you've already retrieved from StackExchange.php artisan exportStackExchange --S3=false is an available option to skip uploading to Amazon S3./storage/app/StackExchange folder, and a zip of those files will appear in S3.# These are sample .env values:
STACKAPPS_CLIENT_ID=12227
STACKAPPS_CLIENT_SECRET=ydxGSDFHDF4DtZqCesr)yJIw((
STACKAPPS_KEY=JuWsTgfG2CqjdghkhdgBkQ((
AWS_ACCESS_KEY_ID=AKIAmb3mbn56mn6
AWS_SECRET_ACCESS_KEY=jl234k5jl23k45j23lj5
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=xyz
This is the first package that I've ever made, and I'm super curious if anyone will ever use it. If you do try it out, I'd love for you to open an issue to say hi (and of course to tell me any suggestions you have).
Visit https://api.stackexchange.com/docs to read the docs, and you can modify ExportStackExchangeHelper.php to do whatever you want. The Stack Exchange API is great.
2024-07-06_135807_ET
cd /mnt/c/code/stackExchangeBackupDemo2 && php artisan exportStackExchange --forgetCache.C:\code\stackExchangeBackupDemo2\vendor\ryancwalsh\stack-exchange-backup-laravel\src\ExportStackExchangeHelper.php.https://github.com/ryancwalsh/StackExchangeBackupLaravelPHP/issues/11#issuecomment-824137479
https://stackapps.com/questions/10497/suddenly-getting-couldnt-parse-client-id?noredirect=1#comment20685_10497
https://stackapps.com/questions/10497/suddenly-getting-couldnt-parse-client-id#comment20685_10497 By posting into reqbin.com/post-online in x-www-form-urlencoded mode instead of application/json, I'm able to retrieve an access_token.
url: https://stackoverflow.com/oauth/access_token/json
payload: client_id=(from_laravel.log)__ client_secret=(from_laravel.log)__ code=(from_browser_URL)__ redirect_uri=https://stackexchange.com/oauth/login_success
Get the access_token from the result.
Put a line like return json_encode(['access_token'=> 'Ke4q2tsof5yfPUTf']); as the first line of public function getAccessTokenJson() in C:\code\stackExchangeBackupDemo2\vendor\ryancwalsh\stack-exchange-backup-laravel\src\ExportStackExchangeHelper.php.
In a new VSC window, open C:\code\stack-exchange-backup-laravel\src\ExportStackExchangeHelper.php in its project.
Note that this is NOT symlinked to C:\code\stackExchangeBackupDemo2\vendor\ryancwalsh\stack-exchange-backup-laravel\src\ExportStackExchangeHelper.php