Using WinSCP for FlatPress Backup

This is the right place to report general bugs, make suggestions or ask for help.
Post Reply
Posts: 12
Joined: Wed Jul 31, 2019 4:32 pm

Using WinSCP for FlatPress Backup

Post by miksmith » Wed May 27, 2020 9:59 am

An FYI, in case it helps others. I’ve opted for a client-side approach for FlatPress backups with my tool of choice being the open source WinSCP. I’ve found WinSCP better than FileZilla, not least because it has reliably handled large file transfers and maintains the create dates of any files you transfer.

Of particular importance for automating FlatPress backup are directory synchronisation and scripting. In fact, the WinSCP GUI can generate the script for you based upon existing profile settings. For completeness this is the very simple script that I run:

Code: Select all

open ftp://<username>:<password>
lcd c:\mywebsitebackup
cd /
synchronize local -mirror
This opens a connection to the server, changes the local and remote directories before mirroring from the remote to the local. On Windows I can then schedule this to run as a daily task.

A good tool for the arsenal!

User avatar
FlatPress Coder
Posts: 105
Joined: Sat Jan 26, 2019 7:40 pm

Re: Using WinSCP for FlatPress Backup

Post by Arvid » Sun Oct 04, 2020 11:45 am

Thanks for sharing, this is really helpful for automating your FTP backup.

It's worth noting that WinSCP also has a sync dialog for doing this with the program's UI.
Helpful FlatPress links: Project blog 📝 - FlatPress wiki 📖 - FlatPress@Twitter 🐦
Stay up to date with our feeds: Forum RSS feed 📜 - Project blog RSS feed 📜

🇩🇪 Habe aktuell für meinen Arbeitgeber hier im Ruhrgebiet eine Stelle zu besetzen! 🇩🇪
- Softwareentwickler (Webanwendungen) - unbefristet, sofort

Posts: 23
Joined: Mon Aug 12, 2019 11:05 pm

Re: Using WinSCP for FlatPress Backup

Post by Panther » Wed Oct 07, 2020 9:50 pm

I use this method using linux as my operating system
Install program w3m on your operating system

1)Create a file called mybackup.php

#$data = date ("dmY");
$tar = "tar zcvf";
$backup = "backup.tar.gz *";
$stringa = $tar. " " .$backup;
$cancellazione = "rm -f *.tar.gz &";

Put this file on prime directory / where you have flatpress and all files

2)On you computer create this file
and put this line inside the file
w3m && wget

3)Execute this command on your shell:

The script will execute the mybackup.php on website and will get file.tar.gz from your website

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest