smartondev / gwbackupy Goto Github PK
View Code? Open in Web Editor NEWOpen source Google Workspace™ backup solution written in python. (gmvault alternative)
License: BSD 3-Clause "New" or "Revised" License
Open source Google Workspace™ backup solution written in python. (gmvault alternative)
License: BSD 3-Clause "New" or "Revised" License
Removing __get_service() from gmail class, and implement a provider interface.
Useful e.g. if destination account is different.
e.g. "... gmail oauth-init"
A web interface where user can easily view the locally stored items. Probably this will be included in a separate package, because it is not necessarily part of this CLI project.
If the backup is not run before, then has not yet marked the missing emails as deleted.
Currently, missing messages can only be restored after running a backup.
It is useful if additional attributes can be added or modified later. e.g. adding hash to messages
Useful when the file is crashed or when checking it on the server.
depend on #28
Add --log-level
parameter
Useful if the user is browsing files in a Windows environment using a desktop application.
Stores mails indefinitely. This is unnecessary in the case of spam or larger letters or other cases.
Gmail restore to same and live account
Describe the bug
I did the SA account JSON key on a paid account as written. It doesn't work.
To Reproduce
Steps to reproduce the behavior:
Run
gwbackupy --service-account-key-filepath sa.json gmail backup --email [email protected]
INFO 2023-08-08 13:33:10,814 - Starting backup for [email protected]
INFO 2023-08-08 13:33:10,814 - Scanning backup storage...
INFO 2023-08-08 13:33:10,814 - Stored items: 0
INFO 2023-08-08 13:33:10,814 - Backing up labels...
INFO 2023-08-08 13:33:10,814 - Getting labels from server ([email protected])
INFO 2023-08-08 13:33:10,816 - file_cache is only supported with oauth2client<4.0.0
INFO 2023-08-08 13:33:10,818 - Attempting refresh to obtain initial access_token
INFO 2023-08-08 13:33:10,820 - Refreshing access_token
INFO 2023-08-08 13:33:10,981 - Failed to retrieve access token: {
"error": "unauthorized_client",
"error_description": "Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested."
}
Desktop (please complete the following information):
Ubuntu Linux CLI
Currently, it always writes to disk regardless of whether its contents have changed.
$ gwbackupy
...
ERROR:root:CLI startup/run failed
Traceback (most recent call last):
File "/home/smarton/.local/lib/python3.10/site-packages/gwbackupy/gwbackupy.py", line 161, in cli_startup
args = parse_arguments()
File "/home/smarton/.local/lib/python3.10/site-packages/gwbackupy/gwbackupy.py", line 137, in parse_arguments
args = parser.parse_args(args=None if sys.argv[1:] else ["--help"])
File "/usr/lib/python3.10/argparse.py", line 1838, in parse_args
args, argv = self.parse_known_args(args, namespace)
File "/usr/lib/python3.10/argparse.py", line 1871, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/usr/lib/python3.10/argparse.py", line 2080, in _parse_known_args
start_index = consume_optional(start_index)
File "/usr/lib/python3.10/argparse.py", line 2020, in consume_optional
take_action(action, args, option_string)
File "/usr/lib/python3.10/argparse.py", line 1948, in take_action
action(self, namespace, argument_values, option_string)
File "/usr/lib/python3.10/argparse.py", line 1112, in __call__
parser.exit()
File "/usr/lib/python3.10/argparse.py", line 2582, in exit
_sys.exit(status)
SystemExit: 0
gwbackupy/gwbackupy/gwbackupy.py
Line 137 in 7468a64
Currently workflow support only the paid plans.
Currently, it is easily possible that the browser starts in a different profile and the user approves it with another profile. The system does not check the email address thereafter, so another account is backed up.
Currently, the service stores the tokens, so sharing them between several services is a problem in the future.
Tasks:
Docker image in separate project.
Currently, during the tests sleep a second, or it is also possible that it is necessary for the backup of more services (e.g. google drive object versions?)
Debian uses python 3.7.2
$ gwbackupy
Traceback (most recent call last):
File "/usr/local/bin/gwbackupy", line 3, in <module>
from gwbackupy import gwbackupy_cli
File "/usr/local/lib/python3.7/dist-packages/gwbackupy/[gwbackupy_cli.py](http://gwbackupy_cli.py/)", line 10, in <module>
from gwbackupy.filters.gmail_filter import GmailFilter
File "/usr/local/lib/python3.7/dist-packages/gwbackupy/filters/[gmail_filter.py](http://gmail_filter.py/)", line 7, in <module>
from gwbackupy.storage.storage_interface import LinkInterface
File "/usr/local/lib/python3.7/dist-packages/gwbackupy/storage/[storage_interface.py](http://storage_interface.py/)", line 53, in <module>
LinkGroupBy = Callable[[LinkInterface], list[Union[str, int]]]
TypeError: 'type' object is not subscriptable
eg. scanning only recent N days, not check deletions
Hi - I'm using the pip installed latest version on Ubuntu. i've just taken my first full backup and im trying to restore it to a different (new) gmail account. I've got the creds etc for both.
I'm attempting to do the restore using the following command:
gwbackupy --credentials-filepath restore-account-creds.json --workdir /mnt/gmail gmail restore --restore-deleted --email [email protected] --to-email [email protected]
I get the following output but nothing is restored.....am i doing something wrong?
thanks!
INFO 2023-04-18 14:04:05,019 - Filter options: deleted
INFO 2023-04-18 14:04:05,019 - Scanning backup storage...
INFO 2023-04-18 14:04:10,497 - Stored items: 476545
INFO 2023-04-18 14:04:10,497 - Loading labels...
INFO 2023-04-18 14:04:10,695 - Labels loaded successfully (23)
INFO 2023-04-18 14:04:10,695 - Getting labels from server ([email protected])
INFO 2023-04-18 14:04:10,703 - file_cache is only supported with oauth2client<4.0.0
INFO 2023-04-18 14:04:10,922 - Filtering messages...
INFO 2023-04-18 14:04:12,848 - Number of potentially affected messages: 0
INFO 2023-04-18 14:04:12,848 - Upload messages...
INFO 2023-04-18 14:04:13,852 - Messages uploaded successfully
if backup is end, then send a report to an email
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.