This project created for manage rsync directories. It's upload files to server every change.
Currently Supports most of the linux computers, WSL1
Tested on WSL1 Ubuntu and Debian.
Currently WSL2 not supported.
sudo curl https://mirrorfy.ahmetozer.org/mirrorfy -o /usr/bin/mirrorfy
sudo chmod +x /usr/bin/mirrorfy
# For ubuntu or Ubuntu on WSL
sudo apt install inotify-tools openssh rsync screen
mirrorfy start
Start mirrorfy daemon.
It watchs your directories and every change uploads your directory to remote
location.
mirrorfy run
Run your mirrorfy only once.
Upload all mirrorfy directories to remote servers.
mirrorfy list
List your all directories in config.
mirrorfy add
Add locations to mirrorfy config list.
This functions has a some flags. Some ones required and showed with bold.
- -n
Config name.
Ex.mirrorfy add -n project1
- -a
Remote server address. You can also define custom user. Ex.mirrorfy add -a 1.1.1.1
mirrorfy add -a ahmet@1.1.1.1
- -d
Remote server directory
Ex.mirrorfy add -d /my/remote/directory
- -l
Local directory. If it is not defined, program will be select current working directory.
Ex.mirrorfy add -l /my/sync/dir
- -p
Custom ssh port. Normally ssh uses port number 22 but if you changed to another port, you have to inform about to program with -p flag.
Ex.mirrorfy add -p 422
- -r
Custom rsync arguments. Mirrorfy is uses "-avzhp --delete" arguments for rsync, but if you want to use custom arguments you can define with -r flag. Note: Do not forget to use " while writing rsync arguments.
Ex.mirrorfy add -r "-avzhp"
mirrorfy add -n myproject1 -a mirrorfy.ahmetozer.org -d /my/remote/dir
mirrorfy add -n myproject1 -a ahmet@mirrorfy.ahmetozer.org -d /my/remote/dir -p 68
mirrorfy add -n myproject1 -a sync@mirrorfy.ahmetozer.org -d /my/remote/dir -l /my/local/dir/
mirrorfy add -n myproject1 -a mirrorfy.ahmetozer.org -d /my/remote/dir -p 99 -l /my/local/directory/
mirrorfy service
You can control mirrorfy service on your linux or windows machine
- start
Start mirrorfy service - stop
Stop mirrorfy service - restart
Restart mirrorfy service - register
Add mirrorfy to startup in linux or Create task in Windows - unregister
Delete mirrorfy at startup in linux or Delete task in Windows
Run mirrorfy service register
to add mirrorfy startup folder.
Run cmd as Administrator and enter to WSL enviroment with wsl command, then execute mirrorfy service register
command to register Mirrorfy service on windows.
Note: You have to create SSH keys on your pc and upload this keys to your server. After uploading ssh key, Please make test connection to your server before adding mirrorfy. You can found more information to creating ssh key and upload, Please visit ahmetozer.org