FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


RSync?





Marston
Does server 2 have RSync installed? I was interested in mirroring a (fairly small) website about a band that I'm really passionate about. If server 2 doesn't have RSync installed, is there any chance that we could ever have it installed?

Thanks.
Bondings
Marston wrote:
Does server 2 have RSync installed? I was interested in mirroring a (fairly small) website about a band that I'm really passionate about. If server 2 doesn't have RSync installed, is there any chance that we could ever have it installed?

Thanks.

We have rsync installed. However I don't think you're able to use it - or at least it won't be easy.

And do you have permission to mirror that website?
Marston
Yes, I emailed the owner of the website (http://fredd-e.narfum.org/boc/info/), and he said he would be glad if I mirrored the site.

Will there be any way for me to use RSync?

edit: RSync over SSH without giving the user shell access. Idea
Bondings
Marston wrote:
Yes, I emailed the owner of the website (http://fredd-e.narfum.org/boc/info/), and he said he would be glad if I mirrored the site.

Will there be any way for me to use RSync?

edit: RSync over SSH without giving the user shell access. Idea

No sorry, that's not possible and shell access is definately not an option.

What about ftp?
Bondings
By the way, rsync is by my knowledge only possible if you have access to the website/account files in question. And rsyncing the database is definately not possible.
Marston
Yeah, I was only going to RSync the static pages; PHP.net's mirroring tutorial shows that RSync is (fairly commonly, actually) used for mirroring sites. Smile
Marston
I guess I could manually upload all the pages via FTP, but I was sort of hoping for some automated solution. Sad
Daniel15
You could synchronise via FTP...
Here's a script I wrote 2 years ago to synchronise two sites via FTP. I'm not sure if it even works anymore. Basically, you put this script on the server with the files, and that server will connect to another FTP server, and send all the files over.

Code:

<html>
 <head><title>Synchronization</title></head>
 <body>
  <h1>Synchronization</h1><br>
  <b>Synchronization started at
<?php
$thedate = date("l dS F Y h:i:s A");

echo "$thedate</b><br><br>";
$start_time = microtime();

$server="example.com";
$username="example";
$password="changethis";

$src_dir = ".";
$dst_dir = "/public_html/backup/";

$total_b = 0;
echo "Connecting to $server...<br>";
$conn_id = ftp_connect($server);
echo "Logging in as $username...<br>";
$login = ftp_login($conn_id, $username, $password);

echo "<br>Synchronizing...<br>";

set_time_limit(0);
ftp_putAll($conn_id, $src_dir, $dst_dir);



$duration = microtime_diff($start_time, microtime());
$duration = sprintf("%0.3f", $duration);



echo "Synchronization complete, ".round($total_b / 1024, 2)." KB ($total_b bytes) transferred in $duration seconds!<br>";
?>

 </body>
</html>

<?php
function microtime_diff($a, $b) {
   list($a_dec, $a_sec) = explode(" ", $a);
   list($b_dec, $b_sec) = explode(" ", $b);
   return $b_sec - $a_sec + $b_dec - $a_dec;
}

function ftp_putall($conn_id, $src_dir, $dst_dir) {
   global $thedate;
   global $total_b;
   $d = dir($src_dir);
   while($file = $d->read()) { // do this for each file in the directory
      if ($file != "." && $file != "..") { // to prevent an infinite loop
         if (is_dir($src_dir."/".$file)) { // do the following if it is a directory
            if (!@ftp_chdir($conn_id, $dst_dir."/".$file)) {
               ftp_mkdir($conn_id, $dst_dir."/".$file); // create directories that do not yet exist
            }
            ftp_putAll($conn_id, $src_dir."/".$file, $dst_dir."/".$file); // recursive part
            break;
         } else {
            $upload = ftp_put($conn_id, $dst_dir."/".$file, $src_dir."/".$file, FTP_BINARY); // put the files   
            $total_b += filesize($src_dir."/".$file);
         }
      }
   }
   $d->close();
}
?>
Marston
Would that create alot of server load? And, is there some way that I can exclude certian files from being sync'd?
Related topics
Is it possible to use rsync?
CGI/Perl Script to backup a website.
OpenSUSE
Upgrading Norton Ghost 9.0 to Save & Restore
Linux v Windows web servers...
secure shell and rsync?
Hello everyone
kernel compile
Automated server-to-server backup
Synchronize remote files with rsync
online storage to sync files between computers
Can I sync a folder with another folder on my usb?
CLI: login to Desktop Environment
Does this backup software exist
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.