<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Control WebPanel Wiki &#187; Google Drive</title>
	<atom:link href="http://wiki.centos-webpanel.com/tag/google-drive/feed" rel="self" type="application/rss+xml" />
	<link>http://wiki.centos-webpanel.com</link>
	<description>CentOS WebPanel Wiki</description>
	<lastBuildDate>Wed, 12 Feb 2025 20:38:16 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>Copy Local Backup to Google Drive</title>
		<link>http://wiki.centos-webpanel.com/copy-local-backup-to-google-drive</link>
		<comments>http://wiki.centos-webpanel.com/copy-local-backup-to-google-drive#comments</comments>
		<pubDate>Fri, 25 Feb 2022 16:13:11 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Backups]]></category>
		<category><![CDATA[Google Drive]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1769</guid>
		<description><![CDATA[Instructions to Copy Local Backup to Google Drive as an additional backup copy. Download GDrive binary # For x64 wget -O gdrive https://drive.google.com/uc?id=1Ej8VgsW5RgK66Btb9p74tSdHMH3p4UNb&#38;export=download # More versions: https://github.com/gdrive-org/gdrive Move and Permissions mv gdrive /usr/sbin/gdrive chmod 755 /usr/sbin/gdrive Authentication process To generate the authentication URL just run: gdrive # The client must paste the link in his [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Instructions to Copy Local Backup to Google Drive as an additional backup copy.</p>
<h2>Download GDrive binary</h2>
<p># For x64</p>
<pre>wget -O gdrive https://drive.google.com/uc?id=1Ej8VgsW5RgK66Btb9p74tSdHMH3p4UNb&amp;export=download</pre>
<p># More versions:</p>
<p>https://github.com/gdrive-org/gdrive</p>
<h2>Move and Permissions</h2>
<pre>mv gdrive /usr/sbin/gdrive
chmod 755 /usr/sbin/gdrive</pre>
<h2>Authentication process</h2>
<p>To generate the authentication URL just run:</p>
<pre>gdrive</pre>
<p># The client must paste the link in his browser. Accept the permission and you will get a verification code. The client must copy the verification code and give us back to paste it into the shell "<em>Enter verification code</em>"<br />
# We have installed GDrive in CWP and connected it to his Google Drive account.</p>
<h2>Make a remote parent folder</h2>
<p># <strong>Alternative One</strong><br />
The client must go to his Google Drive and create a folder. Then, go to the folder. Now, look at the URL. At the end of the URL, you can see the folder’s path.</p>
<p>Example <em>1Qaz_xExWqnZV0kIlhV335crKGUMh3wnI</em> is the token folder. The client must give that token.</p>
<p># <strong>Alternative Two</strong><br />
Simply run:</p>
<pre>gdrive mkdir &lt;folder name&gt;</pre>
<p>This will return the token</p>
<pre>Directory 1Qaz_xExWqnZV0kIlhV335crKGUMh3wnI created</pre>
<h2>Upload a single file **RECOMMENDED**</h2>
<p>Example:</p>
<pre>tar -czf "/tmp/test-backup-$(date '+%d-%m-%Y').tar.gz" /backup/daily/&lt;user&gt;
gdrive upload --parent 1Qaz_xExWqnZV0kIlhV335crKGUMh3wnI /tmp/test-backup-99-99-9999.tar.gz --delete</pre>
<h2>Upload multi files and subfolders **NO RECOMMENDED - TOO SLOW**</h2>
<pre>gdrive upload --parent --recursive 1Qaz_xExWqnZV0kIlhV335crKGUMh3wnI /backup/daily/&lt;user&gt;</pre>
<h2>Sync folder **NO RECOMMENDED - TOO SLOW**</h2>
<pre>gdrive sync upload /backup/daily/&lt;user&gt; 1Qaz_xExWqnZV0kIlhV335crKGUMh3wnI</pre>
<h2>Notes</h2>
<ul>
<li>With the above commands you can create a custom cronjob that executes backups unattended.</li>
<li>If a file that already exists in the Google Drive folder is uploaded (doesn't apply to the sync command), it isn't overwritten, it creates an exact copy.</li>
<li>If the synchronize folder (sync command) is used at least once, it can no longer be used with the upload command.</li>
</ul>
<p>More info:</p>
<p>https://github.com/gdrive-org/gdrive</p>
<p>&nbsp;</p>
<h4>[tested with CWP7 in JUNE 2019]</h4>
]]></content:encoded>
			<wfw:commentRss>http://wiki.centos-webpanel.com/copy-local-backup-to-google-drive/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
