I just succeed in passing CORS with tomcat and angular.js.

There's something you may need to configure:


Change cors.supportedHeaders to this:

&lt;init-param&gt;
    &lt;param-name&gt;cors.supportedHeaders&lt;/param-name&gt;
    &lt;param-value&gt;Accept, Origin, X-Requested-With, Content-Type, Last-Modified&lt;/param-value&gt;
&lt;/init-param&gt;

Make sure your filter is before any other filters.
Try to change contentType to this:

contentType: "application/x-www-form-urlencoded; charset=utf-8"



Try it man.

Tomcat "Access-Control-Allow-Origin" and JavaScript
Question

Using only the command line, is it possible to tell if a rsync backup (on a NAS) and the original folder tree (on a web server) are exactly the same? I mean in terms of file sizes, attributes, and symbolic links?

I feat the most for symbolic links. In case of a hard-drive failure – let's say I can solve all the booting issues – will I be able to put back all the files with all the symbolic links done right and their permissions / attributes?

Context
I am setting up an rsync backup system in which my NAS (arm processor) connects to my dedicated webserver hosted far far away and does a backup of the / partition. 

In case of a disk crash, I plan on making the exact same partition setup on the new disk, on installing the same operating system (14.04) so I get the MBR / boot loader in place. 

Then I will rsync back the backup from the NAS to the server, reboot and cross my fingers.

The issue is that I will only know if everything works the day I need the backup…. But I can take measures to know if it will work before. One of them is checking that every single file, folder, sym link… in the backup has the same permissions, attributes, whatever than the original. I also need to check that the sym links and similar are correctly done.

The options I use with rsync are :

rsync -rlptgoDXvxzH --numeric-ids --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"}


The option A is causing issues.

EDIT: ADDITIONAL INFO

What I am looking for is a working backup strategy that will allow me:

– to perform blazing fast backups.
Because I do backup the / system partition, I take most services down on the server (apache, postfix, dovecot, mysql, etc.) so I can have a safe backup. Any solution such as rsync is good, because I can update a mirror directory on the NAS. Then, offline, I can take care of the backup strategy (incremental, etc…) from the updated mirror.

– to have fast restore (I don't want to transfer a 100 GB disk image).
I have a really really fast connection between the NAS and the server. I mean really fast. Transferring a 10 GB disk image is a matter of minutes.

What I can't do: change the physical setup of the hosted server. I have one 500 GB disk. That's all.

What I can do: boot the server in a rescue mode in which the disk isn't mounted at all. Rescue mode even works with a dead disk. I use this mode to perform binary images of partitions.

Current setup: 
/     10 GB, 17 % full
SWAP 512 Mo
/var  80 GB
/bkup the rest… to 500 GB.
