Hello dear friends, tell me if there is a solution for a bat file for Windows to create a backup? The config file is encrypted with a password, how do I enter the password as a parameter in the bat file? Thank you all!
rclone is not really a backup program, but a fancy file copier.
i think the closet you will get for backups with rclone and dos batch files is:
@for /f "tokens=2 delims==" %%I in ('wmic os get localdatetime /format:list') do set datetime=%%I
@set datetime=%datetime:~0,4%%datetime:~4,2%%datetime:~6,2%.%datetime:~8,2%%datetime:~10,2%%datetime:~12,2%
rclone sync c:\data gdrive:DOCUMENTOS\OFFICE\current --backup-dir=gdrive:DOCUMENTOS\OFFICE\archive\%datetime%
backup programs on windows creates a vss snapshot and uses that as the source.
rclone cannot create vss snapshots and as a result, cannot copy open, in-use files.
I really like fancy file copier:)
Please tell me if you have an article on the topic of bat, your solution seems complicated, a regular bat file with a minimum load for a home server. The files that I am going to copy are rarely used, so there is no need for vss.
I would ask myself a question why the heck I encrypted my rclone config file and then put my clear text password in another file 5min later:)
Make sure that you have full disk encryption ON and your Windows credentials are strong (ideally with 2FA). Then trust your environment a bit and make your life easier.
on windows, that is done with bitlocker.
the way i have it setup is
full disk using hardware encryption, not software encryption.
to boot, require a key file and a password.
manage-bde.exe -status
BitLocker Drive Encryption: Configuration Tool version 10.0.26100
Copyright (C) 2013 Microsoft Corporation. All rights reserved.
Disk volumes that can be protected with
BitLocker Drive Encryption:
Volume C: [EN10CDRIVE]
[OS Volume]
Size: 140.58 GB
BitLocker Version: 2.0
Conversion Status: Fully Encrypted
Percentage Encrypted: 100.0%
Encryption Method: Hardware Encryption - 1.3.111.2.1619.0.1.2
Protection Status: Protection On
actually, FDE makes life less easy for a beginner/newbie.
have to be very well prepared to deal with disasters, as cannot easily use rescue boot using PE, rollback using system restore and so on.
cannot easily remove the hard drive from a dead machine, plug it into a new machine and boot up.
for that, need to use and test, a bare-metal backup that can perform recovery to dissimilar hardware or to VM.
for that, i use free veeam backup and replication.
for many users, it is enough to encrypt the entire user profile or any set of individual folders
as for running rclone in background, there are many ways.
rclone --no-console ...
start rclone ...
nircmd exec2 hide rclone ...
using windows task scheduler. has a nice GUI, can run tasks on demand, on a schedule, at boot time, at login, repeat command every x minutes, etc...
i have written about it in the forum, including screenshots.
each time rclone copy|sync is run, rclone will compare source and dest
with rclone copy, only new files and changed files will be uploaded.
with rclone sync, in addiiton, if a source file is deleted, then the cooresponding file in the dest is deleted.
dear friend, how to set several paths for synchronization at once, for example C: and D:? and is it possible to set a network path for downloading, which is specified as follows \\myserver\data?
[cd]
type = combine
upstreams = c=c:\ d=d:\
rclone ls cd:
using native os commads
set root=b:\root
mkdir %root%
mklink /j %root%\c c:\
mklink /j %root%\d d:\
subst x: %root%
:: list files on c:\ and d:\ using path
rclone ls %root%
:: list files on c:\ and d:\ using drive letter
rclone ls x:\