Skip to content

With this CLI you will be able to connect through SSH to the desired client, generate a ZIP file in the SiteGround server of the "www/" directory, copy that file to the local directory under './backup', delete the server file, and download the zip through SFTP.

License

Notifications You must be signed in to change notification settings

djigoio/Siteground-WP-Backup-CLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WP SSH/SFTP Backup CLI

With this CLI you will be able to connect through SSH to the desired client, generate a ZIP file in the SiteGround server of the "www/" directory, copy that file to the local directory under './backup', delete the server file, and download the zip through SFTP.

Then, upload this ZIP file to the specified GSC Bucket.

TODO

  • Test suite
  • Upload the ZIP to the GCS Bucket
  • Add an env file? so no credential input is needed
  • Refactor code

Installation

go build main.go

Example usage on the terminal

example:wp-backup-cli djigo$ go run main.go connect

Please write your SSH username:
sshUsername

Now introduce the client host:
yourwpsite.com

Now introduce the desired port:
18765

Successfully connected to ssh server.
File will be called: 2021_03_04_160033_yourwpsite.com.zip
Zipping the site, please be patient...
Done!
Copying file from SFTP to your ./backups directory ...
Also done!
Deleting zip file from the server...
Exiting, bye! :D

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

About

With this CLI you will be able to connect through SSH to the desired client, generate a ZIP file in the SiteGround server of the "www/" directory, copy that file to the local directory under './backup', delete the server file, and download the zip through SFTP.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages